about summary refs log tree commit diff
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2023-04-25 12:10:55 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2023-04-25 19:23:45 -0700
commit065d81ac6f8ab8dbc8bd39fc672bf821282d556e (patch)
treec6027b33318a92e6377f04af503c71767019a214
parentb908472a93f218f12d8f980ddf6b008ecee83c87 (diff)
downloadrust-065d81ac6f8ab8dbc8bd39fc672bf821282d556e.tar.gz
rust-065d81ac6f8ab8dbc8bd39fc672bf821282d556e.zip
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.
-rw-r--r--src/intrinsics/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intrinsics/mod.rs b/src/intrinsics/mod.rs
index 03f2a65fcca..90b36c61114 100644
--- a/src/intrinsics/mod.rs
+++ b/src/intrinsics/mod.rs
@@ -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);