File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11//@ compile-flags: -O -Z merge-functions=disabled --edition=2021
22//@ only-x86_64
3+ // FIXME: Remove the `min-llvm-version`.
4+ //@ min-llvm-version: 19
35
46#![ crate_type = "lib" ]
57#![ feature( try_blocks) ]
68
79use std:: ops:: ControlFlow :: { self , Break , Continue } ;
810use std:: ptr:: NonNull ;
911
12+ // FIXME: The `trunc` and `select` instructions can be eliminated.
1013// CHECK-LABEL: @option_nop_match_32
1114#[ no_mangle]
1215pub fn option_nop_match_32 ( x : Option < u32 > ) -> Option < u32 > {
1316 // 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]]
1520 // CHECK-NEXT: insertvalue { i32, i32 }
1621 // CHECK-NEXT: ret { i32, i32 }
1722 match x {
You can’t perform that action at this time.
0 commit comments