Skip to content

Commit

Permalink
Unrolled build for rust-lang#132777
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#132777 - durin42:llvm-20-poison-prop, r=nikic

try_question_mark_nop: update test for LLVM 20

llvm/llvm-project@dd11636 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
  • Loading branch information
rust-timer authored Nov 9, 2024
2 parents 4b198d6 + 8fcc020 commit 9fc8e66
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/codegen/try_question_mark_nop.rs
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -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),
Expand All @@ -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 }
Expand Down

0 comments on commit 9fc8e66

Please # to comment.