File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1- // skip-filecheck
21// unit-test: ConstProp
3- // compile-flags: -O
42
53// FIXME(wesleywiser): Ideally, we could const-prop away all of this and just be left with
64// `let x = 42` but that doesn't work because const-prop doesn't support `Operand::Indirect`
108// EMIT_MIR_FOR_EACH_BIT_WIDTH
119// EMIT_MIR discriminant.main.ConstProp.diff
1210fn main ( ) {
11+ // CHECK-LABEL: fn main(
12+ // CHECK: bb0: {
13+ // CHECK: switchInt(const 1_isize) -> [1: bb1, otherwise: bb3];
14+ // CHECK: bb1: {
15+ // CHECK: switchInt(const true) -> [0: bb3, otherwise: bb2];
16+ // CHECK: bb2: {
17+ // CHECK: [[tmp:_.*]] = const 42_i32;
18+ // CHECK: goto -> bb4;
19+ // CHECK: bb3: {
20+ // CHECK: [[tmp]] = const 10_i32;
21+ // CHECK: goto -> bb4;
22+ // CHECK: bb4: {
23+ // CHECK: {{_.*}} = Add(move [[tmp]], const 0_i32);
1324 let x = ( if let Some ( true ) = Some ( true ) { 42 } else { 10 } ) + 0 ;
1425}
You can’t perform that action at this time.
0 commit comments