introduce and use ptradd/inbounds_ptradd instead of gep

This commit is contained in:
Erik Desjardins 2024-02-24 02:01:41 -05:00
parent 19a648218f
commit 70346fe2a4

View File

@ -839,11 +839,7 @@ fn scalar_load_metadata<'a, 'gcc, 'tcx>(bx: &mut Builder<'a, 'gcc, 'tcx>, load:
let llptr = if i == 0 { let llptr = if i == 0 {
place.llval place.llval
} else { } else {
self.inbounds_gep( self.inbounds_ptradd(place.llval, self.const_usize(b_offset.bytes()))
self.type_i8(),
place.llval,
&[self.const_usize(b_offset.bytes())],
)
}; };
let llty = place.layout.scalar_pair_element_gcc_type(self, i); let llty = place.layout.scalar_pair_element_gcc_type(self, i);
let load = self.load(llty, llptr, align); let load = self.load(llty, llptr, align);