]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/dataflow-const-prop/enum.constant.DataflowConstProp.32bit.diff
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / mir-opt / dataflow-const-prop / enum.constant.DataflowConstProp.32bit.diff
1 - // MIR for `constant` before DataflowConstProp
2 + // MIR for `constant` after DataflowConstProp
3
4 fn constant() -> () {
5 let mut _0: ();
6 let _1: E;
7 let mut _3: isize;
8 scope 1 {
9 debug e => _1;
10 let _2: i32;
11 let _4: i32;
12 let _5: i32;
13 scope 2 {
14 debug x => _2;
15 }
16 scope 3 {
17 debug x => _4;
18 }
19 scope 4 {
20 debug x => _5;
21 }
22 }
23
24 bb0: {
25 StorageLive(_1);
26 _1 = const _;
27 StorageLive(_2);
28 - _3 = discriminant(_1);
29 - switchInt(move _3) -> [0: bb3, 1: bb1, otherwise: bb2];
30 + _3 = const 0_isize;
31 + switchInt(const 0_isize) -> [0: bb3, 1: bb1, otherwise: bb2];
32 }
33
34 bb1: {
35 StorageLive(_5);
36 _5 = ((_1 as V2).0: i32);
37 _2 = _5;
38 StorageDead(_5);
39 goto -> bb4;
40 }
41
42 bb2: {
43 unreachable;
44 }
45
46 bb3: {
47 StorageLive(_4);
48 - _4 = ((_1 as V1).0: i32);
49 - _2 = _4;
50 + _4 = const 0_i32;
51 + _2 = const 0_i32;
52 StorageDead(_4);
53 goto -> bb4;
54 }
55
56 bb4: {
57 _0 = const ();
58 StorageDead(_2);
59 StorageDead(_1);
60 return;
61 }
62 }
63