199 lines
5.0 KiB
Diff
199 lines
5.0 KiB
Diff
|
- // MIR for `multiple_branches` before GVN
|
||
|
+ // MIR for `multiple_branches` after GVN
|
||
|
|
||
|
fn multiple_branches(_1: bool, _2: u8, _3: u8) -> () {
|
||
|
debug t => _1;
|
||
|
debug x => _2;
|
||
|
debug y => _3;
|
||
|
let mut _0: ();
|
||
|
let _4: ();
|
||
|
let mut _5: bool;
|
||
|
let _6: ();
|
||
|
let mut _7: u8;
|
||
|
let mut _8: u8;
|
||
|
let mut _9: u8;
|
||
|
let _10: ();
|
||
|
let mut _11: u8;
|
||
|
let mut _12: u8;
|
||
|
let mut _13: u8;
|
||
|
let _14: ();
|
||
|
let mut _15: u8;
|
||
|
let mut _16: u8;
|
||
|
let mut _17: u8;
|
||
|
let _18: ();
|
||
|
let mut _19: u8;
|
||
|
let mut _20: u8;
|
||
|
let mut _21: u8;
|
||
|
let _22: ();
|
||
|
let mut _23: u8;
|
||
|
let mut _24: u8;
|
||
|
let mut _25: u8;
|
||
|
let mut _26: bool;
|
||
|
let _27: ();
|
||
|
let mut _28: u8;
|
||
|
let mut _29: u8;
|
||
|
let mut _30: u8;
|
||
|
let _31: ();
|
||
|
let mut _32: u8;
|
||
|
let mut _33: u8;
|
||
|
let mut _34: u8;
|
||
|
|
||
|
bb0: {
|
||
|
- StorageLive(_4);
|
||
|
- StorageLive(_5);
|
||
|
- _5 = _1;
|
||
|
- switchInt(move _5) -> [0: bb4, otherwise: bb1];
|
||
|
+ switchInt(_1) -> [0: bb4, otherwise: bb1];
|
||
|
}
|
||
|
|
||
|
bb1: {
|
||
|
StorageLive(_6);
|
||
|
- StorageLive(_7);
|
||
|
- StorageLive(_8);
|
||
|
- _8 = _2;
|
||
|
- StorageLive(_9);
|
||
|
- _9 = _3;
|
||
|
- _7 = Add(move _8, move _9);
|
||
|
- StorageDead(_9);
|
||
|
- StorageDead(_8);
|
||
|
- _6 = opaque::<u8>(move _7) -> [return: bb2, unwind unreachable];
|
||
|
+ _7 = Add(_2, _3);
|
||
|
+ _6 = opaque::<u8>(_7) -> [return: bb2, unwind unreachable];
|
||
|
}
|
||
|
|
||
|
bb2: {
|
||
|
- StorageDead(_7);
|
||
|
StorageDead(_6);
|
||
|
StorageLive(_10);
|
||
|
- StorageLive(_11);
|
||
|
- StorageLive(_12);
|
||
|
- _12 = _2;
|
||
|
- StorageLive(_13);
|
||
|
- _13 = _3;
|
||
|
- _11 = Add(move _12, move _13);
|
||
|
- StorageDead(_13);
|
||
|
- StorageDead(_12);
|
||
|
- _10 = opaque::<u8>(move _11) -> [return: bb3, unwind unreachable];
|
||
|
+ _10 = opaque::<u8>(_7) -> [return: bb3, unwind unreachable];
|
||
|
}
|
||
|
|
||
|
bb3: {
|
||
|
- StorageDead(_11);
|
||
|
StorageDead(_10);
|
||
|
- _4 = const ();
|
||
|
goto -> bb7;
|
||
|
}
|
||
|
|
||
|
bb4: {
|
||
|
StorageLive(_14);
|
||
|
- StorageLive(_15);
|
||
|
- StorageLive(_16);
|
||
|
- _16 = _2;
|
||
|
- StorageLive(_17);
|
||
|
- _17 = _3;
|
||
|
- _15 = Add(move _16, move _17);
|
||
|
- StorageDead(_17);
|
||
|
- StorageDead(_16);
|
||
|
- _14 = opaque::<u8>(move _15) -> [return: bb5, unwind unreachable];
|
||
|
+ _15 = Add(_2, _3);
|
||
|
+ _14 = opaque::<u8>(_15) -> [return: bb5, unwind unreachable];
|
||
|
}
|
||
|
|
||
|
bb5: {
|
||
|
- StorageDead(_15);
|
||
|
StorageDead(_14);
|
||
|
StorageLive(_18);
|
||
|
- StorageLive(_19);
|
||
|
- StorageLive(_20);
|
||
|
- _20 = _2;
|
||
|
- StorageLive(_21);
|
||
|
- _21 = _3;
|
||
|
- _19 = Add(move _20, move _21);
|
||
|
- StorageDead(_21);
|
||
|
- StorageDead(_20);
|
||
|
- _18 = opaque::<u8>(move _19) -> [return: bb6, unwind unreachable];
|
||
|
+ _18 = opaque::<u8>(_15) -> [return: bb6, unwind unreachable];
|
||
|
}
|
||
|
|
||
|
bb6: {
|
||
|
- StorageDead(_19);
|
||
|
StorageDead(_18);
|
||
|
- _4 = const ();
|
||
|
goto -> bb7;
|
||
|
}
|
||
|
|
||
|
bb7: {
|
||
|
- StorageDead(_5);
|
||
|
- StorageDead(_4);
|
||
|
StorageLive(_22);
|
||
|
- StorageLive(_23);
|
||
|
- StorageLive(_24);
|
||
|
- _24 = _2;
|
||
|
- StorageLive(_25);
|
||
|
- _25 = _3;
|
||
|
- _23 = Add(move _24, move _25);
|
||
|
- StorageDead(_25);
|
||
|
- StorageDead(_24);
|
||
|
- _22 = opaque::<u8>(move _23) -> [return: bb8, unwind unreachable];
|
||
|
+ _23 = Add(_2, _3);
|
||
|
+ _22 = opaque::<u8>(_23) -> [return: bb8, unwind unreachable];
|
||
|
}
|
||
|
|
||
|
bb8: {
|
||
|
- StorageDead(_23);
|
||
|
StorageDead(_22);
|
||
|
- StorageLive(_26);
|
||
|
- _26 = _1;
|
||
|
- switchInt(move _26) -> [0: bb11, otherwise: bb9];
|
||
|
+ switchInt(_1) -> [0: bb11, otherwise: bb9];
|
||
|
}
|
||
|
|
||
|
bb9: {
|
||
|
StorageLive(_27);
|
||
|
- StorageLive(_28);
|
||
|
- StorageLive(_29);
|
||
|
- _29 = _2;
|
||
|
- StorageLive(_30);
|
||
|
- _30 = _3;
|
||
|
- _28 = Add(move _29, move _30);
|
||
|
- StorageDead(_30);
|
||
|
- StorageDead(_29);
|
||
|
- _27 = opaque::<u8>(move _28) -> [return: bb10, unwind unreachable];
|
||
|
+ _27 = opaque::<u8>(_23) -> [return: bb10, unwind unreachable];
|
||
|
}
|
||
|
|
||
|
bb10: {
|
||
|
- StorageDead(_28);
|
||
|
StorageDead(_27);
|
||
|
_0 = const ();
|
||
|
goto -> bb13;
|
||
|
}
|
||
|
|
||
|
bb11: {
|
||
|
StorageLive(_31);
|
||
|
- StorageLive(_32);
|
||
|
- StorageLive(_33);
|
||
|
- _33 = _2;
|
||
|
- StorageLive(_34);
|
||
|
- _34 = _3;
|
||
|
- _32 = Add(move _33, move _34);
|
||
|
- StorageDead(_34);
|
||
|
- StorageDead(_33);
|
||
|
- _31 = opaque::<u8>(move _32) -> [return: bb12, unwind unreachable];
|
||
|
+ _31 = opaque::<u8>(_23) -> [return: bb12, unwind unreachable];
|
||
|
}
|
||
|
|
||
|
bb12: {
|
||
|
- StorageDead(_32);
|
||
|
StorageDead(_31);
|
||
|
_0 = const ();
|
||
|
goto -> bb13;
|
||
|
}
|
||
|
|
||
|
bb13: {
|
||
|
- StorageDead(_26);
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
|