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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user