about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Maurer <mmaurer@google.com>2024-01-02 17:46:57 +0000
committerMatthew Maurer <mmaurer@google.com>2024-01-02 18:02:17 +0000
commitee86b1f84cf47f9ffea1bfc9b4ab4357e9611c05 (patch)
tree3049f9d1ac04d50cbf948fb041762282d300f2ba
parentae612bedcbfc7098d1711eb35bc7ca994eb17a4c (diff)
downloadrust-ee86b1f84cf47f9ffea1bfc9b4ab4357e9611c05.tar.gz
rust-ee86b1f84cf47f9ffea1bfc9b4ab4357e9611c05.zip
llvm: Allow `noundef` in codegen tests
LLVM 18 will automatically infer `noundef` in some situations.
Adjust codegen tests to accept this.

See llvm/llvm-project#76553 for why `noundef` is being generated now.
-rw-r--r--tests/codegen/abi-main-signature-32bit-c-int.rs2
-rw-r--r--tests/codegen/sparc-struct-abi.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/codegen/abi-main-signature-32bit-c-int.rs b/tests/codegen/abi-main-signature-32bit-c-int.rs
index 34571823f13..771ca66daf8 100644
--- a/tests/codegen/abi-main-signature-32bit-c-int.rs
+++ b/tests/codegen/abi-main-signature-32bit-c-int.rs
@@ -8,4 +8,4 @@
 fn main() {
 }
 
-// CHECK: define{{( hidden)?}} i32 @main(i32{{( %0)?}}, ptr{{( %1)?}})
+// CHECK: define{{( hidden| noundef)*}} i32 @main(i32{{( %0)?}}, ptr{{( %1)?}})
diff --git a/tests/codegen/sparc-struct-abi.rs b/tests/codegen/sparc-struct-abi.rs
index e8816e4f303..b94ef79aec7 100644
--- a/tests/codegen/sparc-struct-abi.rs
+++ b/tests/codegen/sparc-struct-abi.rs
@@ -18,7 +18,7 @@ pub struct Bool {
     b: bool,
 }
 
-// CHECK: define i64 @structbool()
+// CHECK: define{{.*}} i64 @structbool()
 // CHECK-NEXT: start:
 // CHECK-NEXT: ret i64 72057594037927936
 #[no_mangle]