Lower intrinsics::offset
to mir::BinOp::Offset
They're semantically the same, so this means the backends don't need to handle the intrinsic and means fewer MIR basic blocks in pointer arithmetic code.
This commit is contained in:
parent
b908472a93
commit
065d81ac6f
1 changed files with 1 additions and 1 deletions
|
@ -534,7 +534,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
|
|||
|
||||
// The only difference between offset and arith_offset is regarding UB. Because Cranelift
|
||||
// doesn't have UB both are codegen'ed the same way
|
||||
sym::offset | sym::arith_offset => {
|
||||
sym::arith_offset => {
|
||||
intrinsic_args!(fx, args => (base, offset); intrinsic);
|
||||
let offset = offset.load_scalar(fx);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue