about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorErik Desjardins <erikdesjardins@users.noreply.github.com>2024-02-24 02:01:41 -0500
committerErik Desjardins <erikdesjardins@users.noreply.github.com>2024-02-26 22:45:53 -0500
commit4724cd4dc4a4776ddedf3612180acfe172c16997 (patch)
tree0bebba409bf8faed1572d95c0e96e1faa7e84094 /compiler/rustc_codegen_gcc
parentbeed25be9a2a9e1e73ca79210da57d294c27f925 (diff)
downloadrust-4724cd4dc4a4776ddedf3612180acfe172c16997.tar.gz
rust-4724cd4dc4a4776ddedf3612180acfe172c16997.zip
introduce and use ptradd/inbounds_ptradd instead of gep
Diffstat (limited to 'compiler/rustc_codegen_gcc')
-rw-r--r--compiler/rustc_codegen_gcc/src/builder.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_gcc/src/builder.rs b/compiler/rustc_codegen_gcc/src/builder.rs
index bae0cc3655d..71a0a4c2e96 100644
--- a/compiler/rustc_codegen_gcc/src/builder.rs
+++ b/compiler/rustc_codegen_gcc/src/builder.rs
@@ -839,11 +839,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, '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_gcc_type(self, i);
                     let load = self.load(llty, llptr, align);