Skip to content

Commit 9a9820e

Browse files
committed
tests: fix up new test for nocapture -> capture(none) change
Same change as #136287, but for a newly introduced test. @rustbot label llvm-main r? @nikic
1 parent 9f48ded commit 9a9820e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/codegen/uninhabited-transparent-return-abi.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
//@ compile-flags: -Copt-level=3
2+
//@ revisions: LLVM20 LLVM21
3+
//@[LLVM20] exact-llvm-major-version: 20
4+
//@[LLVM21] min-llvm-version: 21
25

36
// See https://github.com/rust-lang/rust/issues/135802
47

@@ -24,7 +27,8 @@ extern "Rust" {
2427
pub fn test_uninhabited_ret_by_ref() {
2528
// CHECK: %_1 = alloca [24 x i8], align {{8|4}}
2629
// CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %_1)
27-
// CHECK-NEXT: call void @opaque(ptr noalias nocapture noundef nonnull sret([24 x i8]) align {{8|4}} dereferenceable(24) %_1) #2
30+
// LLVM20-NEXT: call void @opaque(ptr noalias nocapture noundef nonnull sret([24 x i8]) align {{8|4}} dereferenceable(24) %_1) #2
31+
// LLVM21-NEXT: call void @opaque(ptr noalias noundef nonnull sret([24 x i8]) align {{8|4}} captures(none) dereferenceable(24) %_1) #2
2832
// CHECK-NEXT: unreachable
2933
unsafe {
3034
opaque();
@@ -36,7 +40,8 @@ pub fn test_uninhabited_ret_by_ref() {
3640
pub fn test_uninhabited_ret_by_ref_with_arg(rsi: u32) {
3741
// CHECK: %_2 = alloca [24 x i8], align {{8|4}}
3842
// CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %_2)
39-
// CHECK-NEXT: call void @opaque_with_arg(ptr noalias nocapture noundef nonnull sret([24 x i8]) align {{8|4}} dereferenceable(24) %_2, i32 noundef %rsi) #2
43+
// LLVM20-NEXT: call void @opaque_with_arg(ptr noalias nocapture noundef nonnull sret([24 x i8]) align {{8|4}} dereferenceable(24) %_2, i32 noundef %rsi) #2
44+
// LLVM21-NEXT: call void @opaque_with_arg(ptr noalias noundef nonnull sret([24 x i8]) align {{8|4}} captures(none) dereferenceable(24) %_2, i32 noundef %rsi) #2
4045
// CHECK-NEXT: unreachable
4146
unsafe {
4247
opaque_with_arg(rsi);

0 commit comments

Comments
 (0)