mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
parent
df3b7cb1b4
commit
657346a057
2 changed files with 16 additions and 2 deletions
|
@ -7921,11 +7921,10 @@ fn int_abs_with_overflow<'a, 'ctx, 'env>(
|
|||
// (xor arg shifted) - shifted
|
||||
|
||||
let bd = env.builder;
|
||||
let ctx = env.context;
|
||||
let shifted_name = "abs_shift_right";
|
||||
let shifted_alloca = {
|
||||
let bits_to_shift = int_type.get_bit_width() as u64 - 1;
|
||||
let shift_val = ctx.i64_type().const_int(bits_to_shift, false);
|
||||
let shift_val = int_type.const_int(bits_to_shift, false);
|
||||
let shifted = bd.build_right_shift(arg, shift_val, true, shifted_name);
|
||||
let alloca = bd.build_alloca(int_type, "#int_abs_help");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue