mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Make sure casting to unsigned types performs zero-extension
Closes #2696
This commit is contained in:
parent
a412cddec2
commit
a90bba3d1d
9 changed files with 67 additions and 16 deletions
|
@ -1101,8 +1101,10 @@ fn build_tag_eq_help<'a, 'ctx, 'env>(
|
|||
let i8_type = env.context.i8_type();
|
||||
|
||||
let sum = env.builder.build_int_add(
|
||||
env.builder.build_int_cast(is_null_1, i8_type, "to_u8"),
|
||||
env.builder.build_int_cast(is_null_2, i8_type, "to_u8"),
|
||||
env.builder
|
||||
.build_int_cast_sign_flag(is_null_1, i8_type, false, "to_u8"),
|
||||
env.builder
|
||||
.build_int_cast_sign_flag(is_null_2, i8_type, false, "to_u8"),
|
||||
"sum_is_null",
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue