Auto merge of #135760 - scottmcm:disjoint-bitor, r=WaffleLapkin
Add `unchecked_disjoint_bitor` per ACP373 Following the names from libs-api in https://github.com/rust-lang/libs-team/issues/373#issuecomment-2085686057 Includes a fallback implementation so this doesn't have to update cg_clif or cg_gcc, and overrides it in cg_llvm to use `or disjoint`, which [is available in LLVM 18](https://releases.llvm.org/18.1.0/docs/LangRef.html#or-instruction) so hopefully we don't need any version checks.
This commit is contained in:
commit
3f33b30e19
14 changed files with 205 additions and 4 deletions
|
@ -472,7 +472,7 @@ pub fn check_intrinsic_type(
|
|||
vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))],
|
||||
tcx.types.usize,
|
||||
),
|
||||
sym::unchecked_div | sym::unchecked_rem | sym::exact_div => {
|
||||
sym::unchecked_div | sym::unchecked_rem | sym::exact_div | sym::disjoint_bitor => {
|
||||
(1, 0, vec![param(0), param(0)], param(0))
|
||||
}
|
||||
sym::unchecked_shl | sym::unchecked_shr => (2, 0, vec![param(0), param(1)], param(0)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue