1
Fork 0

The <*const T>::guaranteed_* methods now return an option for the unknown case

This commit is contained in:
Oli Scherer 2022-09-06 14:08:59 +00:00
parent a594044533
commit f632dbe46f
16 changed files with 119 additions and 584 deletions

View file

@ -555,14 +555,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
return;
}
sym::ptr_guaranteed_eq | sym::ptr_guaranteed_ne => {
sym::ptr_guaranteed_cmp => {
let a = args[0].immediate();
let b = args[1].immediate();
if name == sym::ptr_guaranteed_eq {
bx.icmp(IntPredicate::IntEQ, a, b)
} else {
bx.icmp(IntPredicate::IntNE, a, b)
}
bx.icmp(IntPredicate::IntEQ, a, b)
}
sym::ptr_offset_from | sym::ptr_offset_from_unsigned => {