Skip to content

Commit

Permalink
Auto merge of #134117 - DianQK:gep-i8, r=<try>
Browse files Browse the repository at this point in the history
[WIP] Canonicalize GEPs

Fixes #133979.

r? ghost
  • Loading branch information
bors committed Dec 11, 2024
2 parents 5a6036a + f89b192 commit 98e1ef7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/rustc_codegen_ssa/src/mir/place.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,7 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
layout.size
};

let llval = bx.inbounds_gep(bx.cx().backend_type(self.layout), self.val.llval, &[
bx.cx().const_usize(0),
llindex,
]);
let llval = bx.inbounds_gep(bx.cx().backend_type(layout), self.val.llval, &[llindex]);
let align = self.val.align.restrict_for_offset(offset);
PlaceValue::new_sized(llval, align).with_type(layout)
}
Expand Down

0 comments on commit 98e1ef7

Please sign in to comment.