Skip to content

Commit 065d81a

Browse files
committed
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.
1 parent b908472 commit 065d81a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/intrinsics/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
534534

535535
// The only difference between offset and arith_offset is regarding UB. Because Cranelift
536536
// doesn't have UB both are codegen'ed the same way
537-
sym::offset | sym::arith_offset => {
537+
sym::arith_offset => {
538538
intrinsic_args!(fx, args => (base, offset); intrinsic);
539539
let offset = offset.load_scalar(fx);
540540

0 commit comments

Comments
 (0)