Rollup merge of #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 #105545.

Split out from #121577.
This commit is contained in:
Matthias Krüger 2024-03-06 22:02:48 +01:00 committed by GitHub
commit 1a85eb0187
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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