mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
Removed low level op from bitcode call function. Sometimes the bitcode does not correspond to an op, and also, the op is only used for debugging purposes
This commit is contained in:
parent
c0e5c295b6
commit
7ecdf5ca35
1 changed files with 4 additions and 6 deletions
|
@ -2548,8 +2548,7 @@ fn build_float_binop<'a, 'ctx, 'env>(
|
||||||
|
|
||||||
let result = bd.build_float_add(lhs, rhs, "add_float");
|
let result = bd.build_float_add(lhs, rhs, "add_float");
|
||||||
|
|
||||||
let is_finite =
|
let is_finite = call_bitcode_fn(env, &[result.into()], "is_finite_").into_int_value();
|
||||||
call_bitcode_fn(NumIsFinite, env, &[result.into()], "is_finite_").into_int_value();
|
|
||||||
|
|
||||||
let then_block = context.append_basic_block(parent, "then_block");
|
let then_block = context.append_basic_block(parent, "then_block");
|
||||||
let throw_block = context.append_basic_block(parent, "throw_block");
|
let throw_block = context.append_basic_block(parent, "throw_block");
|
||||||
|
@ -2569,8 +2568,7 @@ fn build_float_binop<'a, 'ctx, 'env>(
|
||||||
|
|
||||||
let result = bd.build_float_add(lhs, rhs, "add_float");
|
let result = bd.build_float_add(lhs, rhs, "add_float");
|
||||||
|
|
||||||
let is_finite =
|
let is_finite = call_bitcode_fn(env, &[result.into()], "is_finite_").into_int_value();
|
||||||
call_bitcode_fn(NumIsFinite, env, &[result.into()], "is_finite_").into_int_value();
|
|
||||||
let is_infinite = bd.build_not(is_finite, "negate");
|
let is_infinite = bd.build_not(is_finite, "negate");
|
||||||
|
|
||||||
let struct_type = context.struct_type(
|
let struct_type = context.struct_type(
|
||||||
|
@ -2699,8 +2697,8 @@ fn build_float_unary_op<'a, 'ctx, 'env>(
|
||||||
env.context.i64_type(),
|
env.context.i64_type(),
|
||||||
"num_floor",
|
"num_floor",
|
||||||
),
|
),
|
||||||
NumIsFinite => call_bitcode_fn(NumIsFinite, env, &[arg.into()], "is_finite_"),
|
NumIsFinite => call_bitcode_fn(env, &[arg.into()], "is_finite_"),
|
||||||
NumAtan => call_bitcode_fn(NumAtan, env, &[arg.into()], "atan_"),
|
NumAtan => call_bitcode_fn(env, &[arg.into()], "atan_"),
|
||||||
_ => {
|
_ => {
|
||||||
unreachable!("Unrecognized int unary operation: {:?}", op);
|
unreachable!("Unrecognized int unary operation: {:?}", op);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue