Skip to content

Commit edfe3bf

Browse files
committed
Revert "tests: allow trunc/select instructions to be missing"
This reverts commit 9692513.
1 parent 5a4ee43 commit edfe3bf

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tests/codegen/try_question_mark_nop.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
//@ compile-flags: -O -Z merge-functions=disabled --edition=2021
22
//@ only-x86_64
33
// FIXME: Remove the `min-llvm-version`.
4-
//@ revisions: NINETEEN TWENTY
5-
//@[NINETEEN] min-llvm-version: 19
6-
//@[NINETEEN] ignore-llvm-version: 20-99
7-
//@[TWENTY] min-llvm-version: 20
4+
//@ min-llvm-version: 19
85

96
#![crate_type = "lib"]
107
#![feature(try_blocks)]
118

129
use std::ops::ControlFlow::{self, Break, Continue};
1310
use std::ptr::NonNull;
1411

12+
// FIXME: The `trunc` and `select` instructions can be eliminated.
1513
// CHECK-LABEL: @option_nop_match_32
1614
#[no_mangle]
1715
pub fn option_nop_match_32(x: Option<u32>) -> Option<u32> {
1816
// CHECK: start:
19-
// NINETEEN-NEXT: [[TRUNC:%.*]] = trunc nuw i32 %0 to i1
20-
// NINETEEN-NEXT: [[FIRST:%.*]] = select i1 [[TRUNC]], i32 %0
21-
// NINETEEN-NEXT: insertvalue { i32, i32 } poison, i32 [[FIRST]], 0
22-
// TWENTY-NEXT: insertvalue { i32, i32 } poison, i32 %0, 0
17+
// CHECK-NEXT: [[TRUNC:%.*]] = trunc nuw i32 %0 to i1
18+
// CHECK-NEXT: [[FIRST:%.*]] = select i1 [[TRUNC]], i32 %0
19+
// CHECK-NEXT: insertvalue { i32, i32 } poison, i32 [[FIRST]]
2320
// CHECK-NEXT: insertvalue { i32, i32 }
2421
// CHECK-NEXT: ret { i32, i32 }
2522
match x {

0 commit comments

Comments
 (0)