summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/gvn.references.GVN.panic-unwind.diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/mir-opt/gvn.references.GVN.panic-unwind.diff113
1 files changed, 113 insertions, 0 deletions
diff --git a/tests/mir-opt/gvn.references.GVN.panic-unwind.diff b/tests/mir-opt/gvn.references.GVN.panic-unwind.diff
new file mode 100644
index 000000000..08ed4c629
--- /dev/null
+++ b/tests/mir-opt/gvn.references.GVN.panic-unwind.diff
@@ -0,0 +1,113 @@
+- // 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: bb10];
+ }
+
+ bb1: {
+ StorageDead(_3);
+ StorageDead(_2);
+ StorageLive(_4);
+ StorageLive(_5);
+ _5 = &_1;
+ _4 = opaque::<&impl Sized>(move _5) -> [return: bb2, unwind: bb10];
+ }
+
+ bb2: {
+ StorageDead(_5);
+ StorageDead(_4);
+ StorageLive(_6);
+ StorageLive(_7);
+ _7 = &mut _1;
+ _6 = opaque::<&mut impl Sized>(move _7) -> [return: bb3, unwind: bb10];
+ }
+
+ bb3: {
+ StorageDead(_7);
+ StorageDead(_6);
+ StorageLive(_8);
+ StorageLive(_9);
+ _9 = &mut _1;
+ _8 = opaque::<&mut impl Sized>(move _9) -> [return: bb4, unwind: bb10];
+ }
+
+ bb4: {
+ StorageDead(_9);
+ StorageDead(_8);
+ StorageLive(_10);
+ StorageLive(_11);
+ _11 = &raw const _1;
+ _10 = opaque::<*const impl Sized>(move _11) -> [return: bb5, unwind: bb10];
+ }
+
+ bb5: {
+ StorageDead(_11);
+ StorageDead(_10);
+ StorageLive(_12);
+ StorageLive(_13);
+ _13 = &raw const _1;
+ _12 = opaque::<*const impl Sized>(move _13) -> [return: bb6, unwind: bb10];
+ }
+
+ bb6: {
+ StorageDead(_13);
+ StorageDead(_12);
+ StorageLive(_14);
+ StorageLive(_15);
+ _15 = &raw mut _1;
+ _14 = opaque::<*mut impl Sized>(move _15) -> [return: bb7, unwind: bb10];
+ }
+
+ bb7: {
+ StorageDead(_15);
+ StorageDead(_14);
+ StorageLive(_16);
+ StorageLive(_17);
+ _17 = &raw mut _1;
+ _16 = opaque::<*mut impl Sized>(move _17) -> [return: bb8, unwind: bb10];
+ }
+
+ bb8: {
+ StorageDead(_17);
+ StorageDead(_16);
+ _0 = const ();
+ drop(_1) -> [return: bb9, unwind: bb11];
+ }
+
+ bb9: {
+ return;
+ }
+
+ bb10 (cleanup): {
+ drop(_1) -> [return: bb11, unwind terminate(cleanup)];
+ }
+
+ bb11 (cleanup): {
+ resume;
+ }
+ }
+