1
0
forked from M-Labs/nac3

nac3core: fix bool to int conversion

This commit is contained in:
ychenfo 2021-12-13 04:11:31 +08:00
parent 4d2fd9582a
commit 82359b81a2

View File

@ -69,10 +69,10 @@ pub fn get_builtins(primitives: &mut (PrimitiveStore, Unifier)) -> BuiltinInfo {
if ctx.unifier.unioned(arg_ty, boolean) {
Some(
ctx.builder
.build_int_s_extend(
.build_int_z_extend(
arg.into_int_value(),
ctx.ctx.i32_type(),
"sext",
"zext",
)
.into(),
)
@ -129,10 +129,10 @@ pub fn get_builtins(primitives: &mut (PrimitiveStore, Unifier)) -> BuiltinInfo {
{
Some(
ctx.builder
.build_int_s_extend(
.build_int_z_extend(
arg.into_int_value(),
ctx.ctx.i64_type(),
"sext",
"zext",
)
.into(),
)