Also use gep inbounds nuw for index projections
This commit is contained in:
parent
31cc4c074d
commit
9e7b1847dc
2 changed files with 3 additions and 3 deletions
|
@ -423,7 +423,7 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
|
|||
layout.size
|
||||
};
|
||||
|
||||
let llval = bx.inbounds_gep(bx.cx().backend_type(layout), self.val.llval, &[llindex]);
|
||||
let llval = bx.inbounds_nuw_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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue