File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
//@ compile-flags: -O -Z merge-functions=disabled --edition=2021
2
2
//@ only-x86_64
3
+ // FIXME: Remove the `min-llvm-version`.
4
+ //@ min-llvm-version: 19
3
5
4
6
#![ crate_type = "lib" ]
5
7
#![ feature( try_blocks) ]
6
8
7
9
use std:: ops:: ControlFlow :: { self , Break , Continue } ;
8
10
use std:: ptr:: NonNull ;
9
11
12
+ // FIXME: The `trunc` and `select` instructions can be eliminated.
10
13
// CHECK-LABEL: @option_nop_match_32
11
14
#[ no_mangle]
12
15
pub fn option_nop_match_32 ( x : Option < u32 > ) -> Option < u32 > {
13
16
// CHECK: start:
14
- // CHECK-NEXT: insertvalue { i32, i32 }
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]]
15
20
// CHECK-NEXT: insertvalue { i32, i32 }
16
21
// CHECK-NEXT: ret { i32, i32 }
17
22
match x {
You can’t perform that action at this time.
0 commit comments