Skip to content

Commit 70346fe

Browse files
introduce and use ptradd/inbounds_ptradd instead of gep
1 parent 19a6482 commit 70346fe

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/builder.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -839,11 +839,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
839839
let llptr = if i == 0 {
840840
place.llval
841841
} else {
842-
self.inbounds_gep(
843-
self.type_i8(),
844-
place.llval,
845-
&[self.const_usize(b_offset.bytes())],
846-
)
842+
self.inbounds_ptradd(place.llval, self.const_usize(b_offset.bytes()))
847843
};
848844
let llty = place.layout.scalar_pair_element_gcc_type(self, i);
849845
let load = self.load(llty, llptr, align);

0 commit comments

Comments
 (0)