diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-04-25 12:10:55 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-04-25 19:23:45 -0700 |
| commit | 05a665f21a6f9763d136a9d2d7c0255de6d333fb (patch) | |
| tree | 4735216a1581cc3a65ede2d7d7b7b49f9ca6b730 /compiler/rustc_codegen_ssa | |
| parent | a7aa20517c80161a2ffe7c0c25fc2e0140c43c90 (diff) | |
| download | rust-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_ssa')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/intrinsic.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs index 7af7fc92dbc..1479242f23a 100644 --- a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs +++ b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs @@ -135,13 +135,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { .unwrap(); OperandRef::from_const(bx, value, ret_ty).immediate_or_packed_pair(bx) } - sym::offset => { - let ty = substs.type_at(0); - let layout = bx.layout_of(ty); - let ptr = args[0].immediate(); - let offset = args[1].immediate(); - bx.inbounds_gep(bx.backend_type(layout), ptr, &[offset]) - } sym::arith_offset => { let ty = substs.type_at(0); let layout = bx.layout_of(ty); |
