about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src
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
commit05a665f21a6f9763d136a9d2d7c0255de6d333fb (patch)
tree4735216a1581cc3a65ede2d7d7b7b49f9ca6b730 /compiler/rustc_codegen_cranelift/src
parenta7aa20517c80161a2ffe7c0c25fc2e0140c43c90 (diff)
downloadrust-05a665f21a6f9763d136a9d2d7c0255de6d333fb.tar.gz
rust-05a665f21a6f9763d136a9d2d7c0255de6d333fb.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.
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
-rw-r--r--compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
index 03f2a65fcca..90b36c61114 100644
--- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
+++ b/compiler/rustc_codegen_cranelift/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);