Skip to content

Commit 1a85eb0

Browse files
authored
Rollup merge of rust-lang#122051 - erikdesjardins:cleanup, r=nikic
cleanup: remove zero-offset GEP This GEP would've been used to change the pointer type in the past, but after opaque pointers it's a no-op. I missed removing this in rust-lang#105545. Split out from rust-lang#121577.
2 parents e93a3d1 + efe5a40 commit 1a85eb0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_codegen_ssa/src/mir/rvalue.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
9494
}
9595

9696
if let OperandValue::Immediate(v) = cg_elem.val {
97-
let zero = bx.const_usize(0);
98-
let start = dest.project_index(bx, zero).llval;
97+
let start = dest.llval;
9998
let size = bx.const_usize(dest.layout.size.bytes());
10099

101100
// Use llvm.memset.p0i8.* to initialize all zero arrays

0 commit comments

Comments
 (0)