mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
INT NEQ for i1 and i8 integer types
This commit is contained in:
parent
4b5f7bfded
commit
d1b00633be
3 changed files with 28 additions and 0 deletions
|
@ -1255,6 +1255,18 @@ fn call_with_args<'a, 'ctx, 'env>(
|
|||
|
||||
BasicValueEnum::IntValue(int_val)
|
||||
}
|
||||
Symbol::INT_NEQ_I1 => {
|
||||
debug_assert!(args.len() == 2);
|
||||
|
||||
let int_val = env.builder.build_int_compare(
|
||||
IntPredicate::NE,
|
||||
args[0].0.into_int_value(),
|
||||
args[1].0.into_int_value(),
|
||||
"cmp_i1",
|
||||
);
|
||||
|
||||
BasicValueEnum::IntValue(int_val)
|
||||
}
|
||||
Symbol::INT_EQ_I8 => {
|
||||
debug_assert!(args.len() == 2);
|
||||
|
||||
|
@ -1267,6 +1279,18 @@ fn call_with_args<'a, 'ctx, 'env>(
|
|||
|
||||
BasicValueEnum::IntValue(int_val)
|
||||
}
|
||||
Symbol::INT_NEQ_I8 => {
|
||||
debug_assert!(args.len() == 2);
|
||||
|
||||
let int_val = env.builder.build_int_compare(
|
||||
IntPredicate::NE,
|
||||
args[0].0.into_int_value(),
|
||||
args[1].0.into_int_value(),
|
||||
"cmp_i8",
|
||||
);
|
||||
|
||||
BasicValueEnum::IntValue(int_val)
|
||||
}
|
||||
Symbol::NUM_TO_FLOAT => {
|
||||
// TODO specialize this to be not just for i64!
|
||||
let builtin_fn_name = "i64_to_f64_";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue