diff options
| author | Nikita Popov <npopov@redhat.com> | 2025-02-19 15:14:12 +0100 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2025-02-19 15:15:29 +0100 |
| commit | 9e7b1847dcd0d5c61c48e362e02c36ad6f8c51ab (patch) | |
| tree | abfe09a061a45cc36021deed002dd92e230ba0dd /compiler/rustc_codegen_ssa/src | |
| parent | 31cc4c074d9df22110daa59d8f5486ae02bac3bd (diff) | |
| download | rust-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.rs | 2 |
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) } |
