From 82359b81a2c93c7633536486d3769e08788ba9c1 Mon Sep 17 00:00:00 2001 From: ychenfo Date: Mon, 13 Dec 2021 04:11:31 +0800 Subject: [PATCH] nac3core: fix bool to int conversion --- nac3core/src/toplevel/builtins.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nac3core/src/toplevel/builtins.rs b/nac3core/src/toplevel/builtins.rs index d9d9045d..fc0c0006 100644 --- a/nac3core/src/toplevel/builtins.rs +++ b/nac3core/src/toplevel/builtins.rs @@ -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(), ) -- 2.44.2