Fix several missing i1/i8 casts #525

Merged
sb10q merged 2 commits from fix/misc-fix into master 2024-08-29 16:36:32 +08:00
Showing only changes of commit 57b6d7903b - Show all commits

View File

@ -2385,7 +2385,10 @@ pub fn gen_cmpop_expr_with_values<'ctx, G: CodeGenerator>(
}) })
.map(BasicValueEnum::into_int_value)?; .map(BasicValueEnum::into_int_value)?;
Ok(ctx.builder.build_not(cmp, "").unwrap()) Ok(ctx.builder.build_not(
generator.bool_to_i1(ctx, cmp),
"",
).unwrap())
}, },
|_, ctx| { |_, ctx| {
let bb = ctx.builder.get_insert_block().unwrap(); let bb = ctx.builder.get_insert_block().unwrap();