summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/copy-prop/calls.nrvo.CopyProp.diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/mir-opt/copy-prop/calls.nrvo.CopyProp.diff24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/mir-opt/copy-prop/calls.nrvo.CopyProp.diff b/tests/mir-opt/copy-prop/calls.nrvo.CopyProp.diff
new file mode 100644
index 000000000..b5d56909b
--- /dev/null
+++ b/tests/mir-opt/copy-prop/calls.nrvo.CopyProp.diff
@@ -0,0 +1,24 @@
+- // MIR for `nrvo` before CopyProp
++ // MIR for `nrvo` after CopyProp
+
+ fn nrvo() -> u8 {
+ let mut _0: u8;
+ let _1: u8;
+ scope 1 {
+- debug y => _1;
++ debug y => _0;
+ }
+
+ bb0: {
+- StorageLive(_1);
+- _1 = dummy(const 5_u8) -> [return: bb1, unwind continue];
++ _0 = dummy(const 5_u8) -> [return: bb1, unwind continue];
+ }
+
+ bb1: {
+- _0 = _1;
+- StorageDead(_1);
+ return;
+ }
+ }
+