diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-11-09 10:52:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-09 10:52:04 +0100 |
| commit | 2829c2725a873c9ed38daf6f48a8bf5da6570b66 (patch) | |
| tree | 9ee1bab730072e42eb1cd4a399112e0f790469c4 /tests/codegen | |
| parent | 6e05afd744ab339fd1fa09e7206bb908242c5cff (diff) | |
| parent | 8fcc020a0c84d316509a48bf3fc97d08e790e83a (diff) | |
| download | rust-2829c2725a873c9ed38daf6f48a8bf5da6570b66.tar.gz rust-2829c2725a873c9ed38daf6f48a8bf5da6570b66.zip | |
Rollup merge of #132777 - durin42:llvm-20-poison-prop, r=nikic
try_question_mark_nop: update test for LLVM 20 llvm/llvm-project@dd116369f646d023a2e7e5c145a1bed5dcf9a45c changes the IR of this test in a way that I don't think is bad, but needs adjusting. r? `@nikic` `@rustbot` label: +llvm-main
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/try_question_mark_nop.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/codegen/try_question_mark_nop.rs b/tests/codegen/try_question_mark_nop.rs index bbab0d9eb1d..b68ecce869e 100644 --- a/tests/codegen/try_question_mark_nop.rs +++ b/tests/codegen/try_question_mark_nop.rs @@ -1,6 +1,10 @@ //@ compile-flags: -O -Z merge-functions=disabled --edition=2021 //@ only-x86_64 // FIXME: Remove the `min-llvm-version`. +//@ revisions: NINETEEN TWENTY +//@[NINETEEN] min-llvm-version: 19 +//@[NINETEEN] ignore-llvm-version: 20-99 +//@[TWENTY] min-llvm-version: 20 //@ min-llvm-version: 19 #![crate_type = "lib"] @@ -13,8 +17,11 @@ use std::ptr::NonNull; #[no_mangle] pub fn option_nop_match_32(x: Option<u32>) -> Option<u32> { // CHECK: start: + // TWENTY-NEXT: %trunc = trunc nuw i32 %0 to i1 + // TWENTY-NEXT: %.2 = select i1 %trunc, i32 %1, i32 undef // CHECK-NEXT: [[REG1:%.*]] = insertvalue { i32, i32 } poison, i32 %0, 0 - // CHECK-NEXT: [[REG2:%.*]] = insertvalue { i32, i32 } [[REG1]], i32 %1, 1 + // NINETEEN-NEXT: [[REG2:%.*]] = insertvalue { i32, i32 } [[REG1]], i32 %1, 1 + // TWENTY-NEXT: [[REG2:%.*]] = insertvalue { i32, i32 } [[REG1]], i32 %.2, 1 // CHECK-NEXT: ret { i32, i32 } [[REG2]] match x { Some(x) => Some(x), @@ -26,6 +33,8 @@ pub fn option_nop_match_32(x: Option<u32>) -> Option<u32> { #[no_mangle] pub fn option_nop_traits_32(x: Option<u32>) -> Option<u32> { // CHECK: start: + // TWENTY-NEXT: %trunc = trunc nuw i32 %0 to i1 + // TWENTY-NEXT: %.1 = select i1 %trunc, i32 %1, i32 undef // CHECK-NEXT: insertvalue { i32, i32 } // CHECK-NEXT: insertvalue { i32, i32 } // CHECK-NEXT: ret { i32, i32 } |
