summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/gvn.references.GVN.panic-abort.diff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/gvn.references.GVN.panic-abort.diff')
-rw-r--r--tests/mir-opt/gvn.references.GVN.panic-abort.diff105
1 files changed, 105 insertions, 0 deletions
diff --git a/tests/mir-opt/gvn.references.GVN.panic-abort.diff b/tests/mir-opt/gvn.references.GVN.panic-abort.diff
new file mode 100644
index 000000000..b7ad4ab1f
--- /dev/null
+++ b/tests/mir-opt/gvn.references.GVN.panic-abort.diff
@@ -0,0 +1,105 @@
+- // MIR for `references` before GVN
++ // MIR for `references` after GVN
+
+ fn references(_1: impl Sized) -> () {
+ debug x => _1;
+ let mut _0: ();
+ let _2: ();
+ let mut _3: &impl Sized;
+ let _4: ();
+ let mut _5: &impl Sized;
+ let _6: ();
+ let mut _7: &mut impl Sized;
+ let _8: ();
+ let mut _9: &mut impl Sized;
+ let _10: ();
+ let mut _11: *const impl Sized;
+ let _12: ();
+ let mut _13: *const impl Sized;
+ let _14: ();
+ let mut _15: *mut impl Sized;
+ let _16: ();
+ let mut _17: *mut impl Sized;
+
+ bb0: {
+ StorageLive(_2);
+ StorageLive(_3);
+ _3 = &_1;
+ _2 = opaque::<&impl Sized>(move _3) -> [return: bb1, unwind unreachable];
+ }
+
+ bb1: {
+ StorageDead(_3);
+ StorageDead(_2);
+ StorageLive(_4);
+ StorageLive(_5);
+ _5 = &_1;
+ _4 = opaque::<&impl Sized>(move _5) -> [return: bb2, unwind unreachable];
+ }
+
+ bb2: {
+ StorageDead(_5);
+ StorageDead(_4);
+ StorageLive(_6);
+ StorageLive(_7);
+ _7 = &mut _1;
+ _6 = opaque::<&mut impl Sized>(move _7) -> [return: bb3, unwind unreachable];
+ }
+
+ bb3: {
+ StorageDead(_7);
+ StorageDead(_6);
+ StorageLive(_8);
+ StorageLive(_9);
+ _9 = &mut _1;
+ _8 = opaque::<&mut impl Sized>(move _9) -> [return: bb4, unwind unreachable];
+ }
+
+ bb4: {
+ StorageDead(_9);
+ StorageDead(_8);
+ StorageLive(_10);
+ StorageLive(_11);
+ _11 = &raw const _1;
+ _10 = opaque::<*const impl Sized>(move _11) -> [return: bb5, unwind unreachable];
+ }
+
+ bb5: {
+ StorageDead(_11);
+ StorageDead(_10);
+ StorageLive(_12);
+ StorageLive(_13);
+ _13 = &raw const _1;
+ _12 = opaque::<*const impl Sized>(move _13) -> [return: bb6, unwind unreachable];
+ }
+
+ bb6: {
+ StorageDead(_13);
+ StorageDead(_12);
+ StorageLive(_14);
+ StorageLive(_15);
+ _15 = &raw mut _1;
+ _14 = opaque::<*mut impl Sized>(move _15) -> [return: bb7, unwind unreachable];
+ }
+
+ bb7: {
+ StorageDead(_15);
+ StorageDead(_14);
+ StorageLive(_16);
+ StorageLive(_17);
+ _17 = &raw mut _1;
+ _16 = opaque::<*mut impl Sized>(move _17) -> [return: bb8, unwind unreachable];
+ }
+
+ bb8: {
+ StorageDead(_17);
+ StorageDead(_16);
+ _0 = const ();
+ drop(_1) -> [return: bb9, unwind unreachable];
+ }
+
+ bb9: {
+ return;
+ }
+ }
+