forked from M-Labs/nac3
1
0
Fork 0

nac3core: fix bool to int conversion

This commit is contained in:
ychenfo 2021-12-13 04:11:31 +08:00
parent 4d2fd9582a
commit 82359b81a2
1 changed files with 4 additions and 4 deletions

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(),
)