introduce and use ptradd/inbounds_ptradd instead of gep
This commit is contained in:
parent
beed25be9a
commit
4724cd4dc4
6 changed files with 27 additions and 38 deletions
|
@ -603,11 +603,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
let llptr = if i == 0 {
|
||||
place.llval
|
||||
} else {
|
||||
self.inbounds_gep(
|
||||
self.type_i8(),
|
||||
place.llval,
|
||||
&[self.const_usize(b_offset.bytes())],
|
||||
)
|
||||
self.inbounds_ptradd(place.llval, self.const_usize(b_offset.bytes()))
|
||||
};
|
||||
let llty = place.layout.scalar_pair_element_llvm_type(self, i, false);
|
||||
let load = self.load(llty, llptr, align);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue