diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
commit | dc0db358abe19481e475e10c32149b53370f1a1c (patch) | |
tree | ab8ce99c4b255ce46f99ef402c27916055b899ee /tests/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals-before-const-prop.panic-abort.diff | |
parent | Releasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals-before-const-prop.panic-abort.diff')
-rw-r--r-- | tests/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals-before-const-prop.panic-abort.diff | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/tests/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals-before-const-prop.panic-abort.diff b/tests/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals-before-const-prop.panic-abort.diff new file mode 100644 index 000000000..54d254ee3 --- /dev/null +++ b/tests/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals-before-const-prop.panic-abort.diff @@ -0,0 +1,86 @@ +- // MIR for `main` before SimplifyLocals-before-const-prop ++ // MIR for `main` after SimplifyLocals-before-const-prop + + fn main() -> () { + let mut _0: (); +- let mut _1: ((), ()); +- let mut _2: (); ++ let _1: (); ++ let mut _2: ((), ()); + let mut _3: (); +- let _4: (); +- let mut _5: ((), ()); +- let mut _6: (); +- let mut _7: (); +- let _8: (); +- let mut _9: u8; +- let mut _10: u8; +- let mut _11: Temp; ++ let mut _4: (); ++ let _5: (); ++ let mut _6: u8; ++ let mut _7: u8; ++ let mut _8: Temp; + scope 1 { + } + + bb0: { + StorageLive(_1); + StorageLive(_2); +- _2 = (); + StorageLive(_3); + _3 = (); +- _1 = (move _2, move _3); ++ StorageLive(_4); ++ _4 = (); ++ _2 = (move _3, move _4); ++ StorageDead(_4); + StorageDead(_3); ++ _1 = use_zst(move _2) -> [return: bb1, unwind unreachable]; ++ } ++ ++ bb1: { + StorageDead(_2); + StorageDead(_1); +- StorageLive(_4); + StorageLive(_5); + StorageLive(_6); +- _6 = (); + StorageLive(_7); +- _7 = (); +- _5 = (move _6, move _7); ++ StorageLive(_8); ++ _8 = Temp { x: const 40_u8 }; ++ _7 = (_8.0: u8); ++ _6 = Add(move _7, const 2_u8); + StorageDead(_7); +- StorageDead(_6); +- _4 = use_zst(move _5) -> [return: bb1, unwind unreachable]; ++ _5 = use_u8(move _6) -> [return: bb2, unwind unreachable]; + } + +- bb1: { +- StorageDead(_5); +- StorageDead(_4); +- StorageLive(_8); +- StorageLive(_9); +- StorageLive(_10); +- StorageLive(_11); +- _11 = Temp { x: const 40_u8 }; +- _10 = (_11.0: u8); +- _9 = Add(move _10, const 2_u8); +- StorageDead(_10); +- _8 = use_u8(move _9) -> [return: bb2, unwind unreachable]; +- } +- + bb2: { +- StorageDead(_9); +- StorageDead(_11); ++ StorageDead(_6); + StorageDead(_8); ++ StorageDead(_5); + _0 = const (); + return; + } + } + |