mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
dev backend: Num.isMultipleOf
This commit is contained in:
parent
10a497fdde
commit
0bf3eefbf2
5 changed files with 34 additions and 1 deletions
|
@ -1165,6 +1165,11 @@ trait Backend<'a> {
|
|||
|
||||
self.build_num_int_cast(sym, &args[0], source_width, target_width)
|
||||
}
|
||||
LowLevel::NumIsMultipleOf => {
|
||||
let int_width = arg_layouts[0].try_int_width().unwrap();
|
||||
let intrinsic = bitcode::NUM_IS_MULTIPLE_OF[int_width].to_string();
|
||||
self.build_fn_call(sym, intrinsic, args, arg_layouts, ret_layout);
|
||||
}
|
||||
x => todo!("low level, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue