From ee86b1f84cf47f9ffea1bfc9b4ab4357e9611c05 Mon Sep 17 00:00:00 2001 From: Matthew Maurer Date: Tue, 2 Jan 2024 17:46:57 +0000 Subject: [PATCH] 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. --- tests/codegen/abi-main-signature-32bit-c-int.rs | 2 +- tests/codegen/sparc-struct-abi.rs | 2 +- 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 34571823f1360..771ca66daf8ea 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 e8816e4f303d4..b94ef79aec7f8 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]