mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
Fix shift filling by flipping inkwell sign_extend flags
See https://thedan64.github.io/inkwell/inkwell/builder/struct.Builder.html#method.build_right_shift Before: ``` » Num.shiftRightBy 1 -8 9223372036854775804 : Int * » Num.shiftRightZfBy 1 -8 -4 : Int * ``` After: ``` » Num.shiftRightBy 1 -8 -4 : Int * » Num.shiftRightZfBy 1 -8 9223372036854775804 : Int * ```
This commit is contained in:
parent
68adeba43c
commit
7d95d2b576
1 changed files with 2 additions and 2 deletions
|
@ -6661,12 +6661,12 @@ fn build_int_binop<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
NumShiftRightBy => {
|
NumShiftRightBy => {
|
||||||
// NOTE arguments are flipped;
|
// NOTE arguments are flipped;
|
||||||
bd.build_right_shift(rhs, lhs, false, "int_shift_right")
|
bd.build_right_shift(rhs, lhs, true, "int_shift_right")
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
NumShiftRightZfBy => {
|
NumShiftRightZfBy => {
|
||||||
// NOTE arguments are flipped;
|
// NOTE arguments are flipped;
|
||||||
bd.build_right_shift(rhs, lhs, true, "int_shift_right_zf")
|
bd.build_right_shift(rhs, lhs, false, "int_shift_right_zf")
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue