Skip to content

Commit

Permalink
Unrolled build for rust-lang#122051
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rust-timer authored Mar 6, 2024
2 parents bfe762e + efe5a40 commit a6b16b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_codegen_ssa/src/mir/rvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
}

if let OperandValue::Immediate(v) = cg_elem.val {
let zero = bx.const_usize(0);
let start = dest.project_index(bx, zero).llval;
let start = dest.llval;
let size = bx.const_usize(dest.layout.size.bytes());

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

0 comments on commit a6b16b9

Please sign in to comment.