about summary refs log tree commit diff
path: root/tests/codegen
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 /tests/codegen
parent31cc4c074d9df22110daa59d8f5486ae02bac3bd (diff)
downloadrust-9e7b1847dcd0d5c61c48e362e02c36ad6f8c51ab.tar.gz
rust-9e7b1847dcd0d5c61c48e362e02c36ad6f8c51ab.zip
Also use gep inbounds nuw for index projections
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/gep-index.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/codegen/gep-index.rs b/tests/codegen/gep-index.rs
index 6b45692bea1..bfb2511af87 100644
--- a/tests/codegen/gep-index.rs
+++ b/tests/codegen/gep-index.rs
@@ -11,7 +11,7 @@ struct Foo(i32, i32);
 // CHECK-LABEL: @index_on_struct(
 #[no_mangle]
 fn index_on_struct(a: &[Foo], index: usize) -> &Foo {
-    // CHECK: getelementptr inbounds %Foo, ptr %a.0, {{i64|i32}} %index
+    // CHECK: getelementptr inbounds{{( nuw)?}} %Foo, ptr %a.0, {{i64|i32}} %index
     &a[index]
 }
 
@@ -25,7 +25,7 @@ fn offset_on_struct(a: *const Foo, index: usize) -> *const Foo {
 // CHECK-LABEL: @index_on_i32(
 #[no_mangle]
 fn index_on_i32(a: &[i32], index: usize) -> &i32 {
-    // CHECK: getelementptr inbounds i32, ptr %a.0, {{i64|i32}} %index
+    // CHECK: getelementptr inbounds{{( nuw)?}} i32, ptr %a.0, {{i64|i32}} %index
     &a[index]
 }