about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2025-02-19 15:14:12 +0100
committerNikita Popov <npopov@redhat.com>2025-02-19 15:15:29 +0100
commit9e7b1847dcd0d5c61c48e362e02c36ad6f8c51ab (patch)
treeabfe09a061a45cc36021deed002dd92e230ba0dd /compiler/rustc_codegen_ssa/src
parent31cc4c074d9df22110daa59d8f5486ae02bac3bd (diff)
downloadrust-9e7b1847dcd0d5c61c48e362e02c36ad6f8c51ab.tar.gz
rust-9e7b1847dcd0d5c61c48e362e02c36ad6f8c51ab.zip
Also use gep inbounds nuw for index projections
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/place.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/place.rs b/compiler/rustc_codegen_ssa/src/mir/place.rs
index eb4270ffe80..84451698c34 100644
--- a/compiler/rustc_codegen_ssa/src/mir/place.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/place.rs
@@ -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)
     }