about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/mir-opt/dest-prop/branch.main.DestinationPropagation.diff (renamed from src/test/mir-opt/dest-prop/branch/rustc.main.DestinationPropagation.diff)23
-rw-r--r--src/test/mir-opt/dest-prop/branch.rs2
-rw-r--r--src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff (renamed from src/test/mir-opt/dest-prop/cycle/rustc.main.DestinationPropagation.diff)25
-rw-r--r--src/test/mir-opt/dest-prop/cycle.rs2
-rw-r--r--src/test/mir-opt/dest-prop/simple.nrvo.DestinationPropagation.diff (renamed from src/test/mir-opt/dest-prop/simple/rustc.nrvo.DestinationPropagation.diff)27
-rw-r--r--src/test/mir-opt/dest-prop/simple.rs2
-rw-r--r--src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff (renamed from src/test/mir-opt/dest-prop/union/rustc.main.DestinationPropagation.diff)23
-rw-r--r--src/test/mir-opt/dest-prop/union.rs2
8 files changed, 25 insertions, 81 deletions
diff --git a/src/test/mir-opt/dest-prop/branch/rustc.main.DestinationPropagation.diff b/src/test/mir-opt/dest-prop/branch.main.DestinationPropagation.diff
index b8387ae4493..9c213eaed3c 100644
--- a/src/test/mir-opt/dest-prop/branch/rustc.main.DestinationPropagation.diff
+++ b/src/test/mir-opt/dest-prop/branch.main.DestinationPropagation.diff
@@ -17,12 +17,9 @@
   
       bb0: {
 -         StorageLive(_1);                 // scope 0 at $DIR/branch.rs:13:9: 13:10
--         _1 = const val() -> bb1;         // scope 0 at $DIR/branch.rs:13:13: 13:18
+-         _1 = val() -> bb1;               // scope 0 at $DIR/branch.rs:13:13: 13:18
 +         nop;                             // scope 0 at $DIR/branch.rs:13:9: 13:10
-+         _2 = const val() -> bb1;         // scope 0 at $DIR/branch.rs:13:13: 13:18
-                                           // ty::Const
-                                           // + ty: fn() -> i32 {val}
-                                           // + val: Value(Scalar(<ZST>))
++         _2 = val() -> bb1;               // scope 0 at $DIR/branch.rs:13:13: 13:18
                                            // mir::Constant
                                            // + span: $DIR/branch.rs:13:13: 13:16
                                            // + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar(<ZST>)) }
@@ -32,10 +29,7 @@
 -         StorageLive(_2);                 // scope 1 at $DIR/branch.rs:15:9: 15:10
 +         nop;                             // scope 1 at $DIR/branch.rs:15:9: 15:10
           StorageLive(_3);                 // scope 1 at $DIR/branch.rs:15:16: 15:22
-          _3 = const cond() -> bb2;        // scope 1 at $DIR/branch.rs:15:16: 15:22
-                                           // ty::Const
-                                           // + ty: fn() -> bool {cond}
-                                           // + val: Value(Scalar(<ZST>))
+          _3 = cond() -> bb2;              // scope 1 at $DIR/branch.rs:15:16: 15:22
                                            // mir::Constant
                                            // + span: $DIR/branch.rs:15:16: 15:20
                                            // + literal: Const { ty: fn() -> bool {cond}, val: Value(Scalar(<ZST>)) }
@@ -47,10 +41,7 @@
   
       bb3: {
           StorageLive(_4);                 // scope 1 at $DIR/branch.rs:18:9: 18:14
-          _4 = const val() -> bb5;         // scope 1 at $DIR/branch.rs:18:9: 18:14
-                                           // ty::Const
-                                           // + ty: fn() -> i32 {val}
-                                           // + val: Value(Scalar(<ZST>))
+          _4 = val() -> bb5;               // scope 1 at $DIR/branch.rs:18:9: 18:14
                                            // mir::Constant
                                            // + span: $DIR/branch.rs:18:9: 18:12
                                            // + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar(<ZST>)) }
@@ -72,12 +63,6 @@
       bb6: {
           StorageDead(_3);                 // scope 1 at $DIR/branch.rs:20:6: 20:7
           _0 = const ();                   // scope 0 at $DIR/branch.rs:12:11: 21:2
-                                           // ty::Const
-                                           // + ty: ()
-                                           // + val: Value(Scalar(<ZST>))
-                                           // mir::Constant
-                                           // + span: $DIR/branch.rs:12:11: 21:2
-                                           // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
 -         StorageDead(_2);                 // scope 1 at $DIR/branch.rs:21:1: 21:2
 -         StorageDead(_1);                 // scope 0 at $DIR/branch.rs:21:1: 21:2
 +         nop;                             // scope 1 at $DIR/branch.rs:21:1: 21:2
diff --git a/src/test/mir-opt/dest-prop/branch.rs b/src/test/mir-opt/dest-prop/branch.rs
index b49ecf07daa..7e0e40671dd 100644
--- a/src/test/mir-opt/dest-prop/branch.rs
+++ b/src/test/mir-opt/dest-prop/branch.rs
@@ -8,7 +8,7 @@ fn cond() -> bool {
     true
 }
 
-// EMIT_MIR rustc.main.DestinationPropagation.diff
+// EMIT_MIR branch.main.DestinationPropagation.diff
 fn main() {
     let x = val();
 
diff --git a/src/test/mir-opt/dest-prop/cycle/rustc.main.DestinationPropagation.diff b/src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff
index 5189b665acf..dd717c1b9c3 100644
--- a/src/test/mir-opt/dest-prop/cycle/rustc.main.DestinationPropagation.diff
+++ b/src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff
@@ -19,7 +19,7 @@
 -                 debug z => _3;           // in scope 3 at $DIR/cycle.rs:11:9: 11:10
 +                 debug z => _4;           // in scope 3 at $DIR/cycle.rs:11:9: 11:10
                   scope 4 {
-                      debug _x => _6;      // in scope 4 at $SRC_DIR/libcore/mem/mod.rs:LL:COL
+                      debug _x => _6;      // in scope 4 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
                   }
               }
           }
@@ -27,12 +27,9 @@
   
       bb0: {
 -         StorageLive(_1);                 // scope 0 at $DIR/cycle.rs:9:9: 9:14
--         _1 = const val() -> bb1;         // scope 0 at $DIR/cycle.rs:9:17: 9:22
+-         _1 = val() -> bb1;               // scope 0 at $DIR/cycle.rs:9:17: 9:22
 +         nop;                             // scope 0 at $DIR/cycle.rs:9:9: 9:14
-+         _4 = const val() -> bb1;         // scope 0 at $DIR/cycle.rs:9:17: 9:22
-                                           // ty::Const
-                                           // + ty: fn() -> i32 {val}
-                                           // + val: Value(Scalar(<ZST>))
++         _4 = val() -> bb1;               // scope 0 at $DIR/cycle.rs:9:17: 9:22
                                            // mir::Constant
                                            // + span: $DIR/cycle.rs:9:17: 9:20
                                            // + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar(<ZST>)) }
@@ -59,26 +56,14 @@
           StorageLive(_6);                 // scope 3 at $DIR/cycle.rs:14:10: 14:11
 -         _6 = _1;                         // scope 3 at $DIR/cycle.rs:14:10: 14:11
 +         _6 = _4;                         // scope 3 at $DIR/cycle.rs:14:10: 14:11
-          _5 = const ();                   // scope 4 at $SRC_DIR/libcore/mem/mod.rs:LL:COL
-                                           // ty::Const
-                                           // + ty: ()
-                                           // + val: Value(Scalar(<ZST>))
-                                           // mir::Constant
-                                           // + span: $SRC_DIR/libcore/mem/mod.rs:LL:COL
-                                           // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
-          drop(_6) -> bb2;                 // scope 4 at $SRC_DIR/libcore/mem/mod.rs:LL:COL
+          _5 = const ();                   // scope 4 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+          drop(_6) -> bb2;                 // scope 4 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
       }
   
       bb2: {
           StorageDead(_6);                 // scope 3 at $DIR/cycle.rs:14:11: 14:12
           StorageDead(_5);                 // scope 3 at $DIR/cycle.rs:14:12: 14:13
           _0 = const ();                   // scope 0 at $DIR/cycle.rs:8:11: 15:2
-                                           // ty::Const
-                                           // + ty: ()
-                                           // + val: Value(Scalar(<ZST>))
-                                           // mir::Constant
-                                           // + span: $DIR/cycle.rs:8:11: 15:2
-                                           // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
 -         StorageDead(_3);                 // scope 2 at $DIR/cycle.rs:15:1: 15:2
 -         StorageDead(_2);                 // scope 1 at $DIR/cycle.rs:15:1: 15:2
 -         StorageDead(_1);                 // scope 0 at $DIR/cycle.rs:15:1: 15:2
diff --git a/src/test/mir-opt/dest-prop/cycle.rs b/src/test/mir-opt/dest-prop/cycle.rs
index d55d527bc65..7fbffb13359 100644
--- a/src/test/mir-opt/dest-prop/cycle.rs
+++ b/src/test/mir-opt/dest-prop/cycle.rs
@@ -4,7 +4,7 @@ fn val() -> i32 {
     1
 }
 
-// EMIT_MIR rustc.main.DestinationPropagation.diff
+// EMIT_MIR cycle.main.DestinationPropagation.diff
 fn main() {
     let mut x = val();
     let y = x;
diff --git a/src/test/mir-opt/dest-prop/simple/rustc.nrvo.DestinationPropagation.diff b/src/test/mir-opt/dest-prop/simple.nrvo.DestinationPropagation.diff
index d59e1f3c0c9..1277c51f2a0 100644
--- a/src/test/mir-opt/dest-prop/simple/rustc.nrvo.DestinationPropagation.diff
+++ b/src/test/mir-opt/dest-prop/simple.nrvo.DestinationPropagation.diff
@@ -16,35 +16,24 @@
   
       bb0: {
 -         StorageLive(_2);                 // scope 0 at $DIR/simple.rs:5:9: 5:16
--         _2 = [const 0u8; 1024];          // scope 0 at $DIR/simple.rs:5:19: 5:28
+-         _2 = [const 0_u8; 1024];         // scope 0 at $DIR/simple.rs:5:19: 5:28
 +         nop;                             // scope 0 at $DIR/simple.rs:5:9: 5:16
-+         _0 = [const 0u8; 1024];          // scope 0 at $DIR/simple.rs:5:19: 5:28
-                                           // ty::Const
-                                           // + ty: u8
-                                           // + val: Value(Scalar(0x00))
-                                           // mir::Constant
-                                           // + span: $DIR/simple.rs:5:20: 5:21
-                                           // + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
++         _0 = [const 0_u8; 1024];         // scope 0 at $DIR/simple.rs:5:19: 5:28
           StorageLive(_3);                 // scope 1 at $DIR/simple.rs:6:5: 6:19
           StorageLive(_4);                 // scope 1 at $DIR/simple.rs:6:5: 6:9
           _4 = _1;                         // scope 1 at $DIR/simple.rs:6:5: 6:9
--         StorageLive(_5);                 // scope 1 at $DIR/simple.rs:6:10: 6:18
--         StorageLive(_6);                 // scope 1 at $DIR/simple.rs:6:10: 6:18
+          StorageLive(_5);                 // scope 1 at $DIR/simple.rs:6:10: 6:18
+          StorageLive(_6);                 // scope 1 at $DIR/simple.rs:6:10: 6:18
 -         _6 = &mut _2;                    // scope 1 at $DIR/simple.rs:6:10: 6:18
--         _5 = move _6;                    // scope 1 at $DIR/simple.rs:6:10: 6:18
-+         nop;                             // scope 1 at $DIR/simple.rs:6:10: 6:18
-+         nop;                             // scope 1 at $DIR/simple.rs:6:10: 6:18
-+         _5 = &mut _0;                    // scope 1 at $DIR/simple.rs:6:10: 6:18
-+         nop;                             // scope 1 at $DIR/simple.rs:6:10: 6:18
++         _6 = &mut _0;                    // scope 1 at $DIR/simple.rs:6:10: 6:18
+          _5 = &mut (*_6);                 // scope 1 at $DIR/simple.rs:6:10: 6:18
           _3 = move _4(move _5) -> bb1;    // scope 1 at $DIR/simple.rs:6:5: 6:19
       }
   
       bb1: {
--         StorageDead(_5);                 // scope 1 at $DIR/simple.rs:6:18: 6:19
-+         nop;                             // scope 1 at $DIR/simple.rs:6:18: 6:19
+          StorageDead(_5);                 // scope 1 at $DIR/simple.rs:6:18: 6:19
           StorageDead(_4);                 // scope 1 at $DIR/simple.rs:6:18: 6:19
--         StorageDead(_6);                 // scope 1 at $DIR/simple.rs:6:19: 6:20
-+         nop;                             // scope 1 at $DIR/simple.rs:6:19: 6:20
+          StorageDead(_6);                 // scope 1 at $DIR/simple.rs:6:19: 6:20
           StorageDead(_3);                 // scope 1 at $DIR/simple.rs:6:19: 6:20
 -         _0 = _2;                         // scope 1 at $DIR/simple.rs:7:5: 7:8
 -         StorageDead(_2);                 // scope 0 at $DIR/simple.rs:8:1: 8:2
diff --git a/src/test/mir-opt/dest-prop/simple.rs b/src/test/mir-opt/dest-prop/simple.rs
index add821eafe0..4655f966998 100644
--- a/src/test/mir-opt/dest-prop/simple.rs
+++ b/src/test/mir-opt/dest-prop/simple.rs
@@ -1,6 +1,6 @@
 //! Copy of `nrvo-simple.rs`, to ensure that full dest-prop handles it too.
 
-// EMIT_MIR rustc.nrvo.DestinationPropagation.diff
+// EMIT_MIR simple.nrvo.DestinationPropagation.diff
 fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] {
     let mut buf = [0; 1024];
     init(&mut buf);
diff --git a/src/test/mir-opt/dest-prop/union/rustc.main.DestinationPropagation.diff b/src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff
index f6ebb6cb940..871f6e35043 100644
--- a/src/test/mir-opt/dest-prop/union/rustc.main.DestinationPropagation.diff
+++ b/src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff
@@ -12,17 +12,14 @@
           scope 2 {
           }
           scope 3 {
-              debug _x => _4;              // in scope 3 at $SRC_DIR/libcore/mem/mod.rs:LL:COL
+              debug _x => _4;              // in scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
           }
       }
   
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/union.rs:13:9: 13:11
           StorageLive(_2);                 // scope 0 at $DIR/union.rs:13:23: 13:28
-          _2 = const val() -> bb1;         // scope 0 at $DIR/union.rs:13:23: 13:28
-                                           // ty::Const
-                                           // + ty: fn() -> u32 {val}
-                                           // + val: Value(Scalar(<ZST>))
+          _2 = val() -> bb1;               // scope 0 at $DIR/union.rs:13:23: 13:28
                                            // mir::Constant
                                            // + span: $DIR/union.rs:13:23: 13:26
                                            // + literal: Const { ty: fn() -> u32 {val}, val: Value(Scalar(<ZST>)) }
@@ -34,26 +31,14 @@
           StorageLive(_3);                 // scope 1 at $DIR/union.rs:15:5: 15:27
           StorageLive(_4);                 // scope 1 at $DIR/union.rs:15:10: 15:26
           _4 = (_1.0: u32);                // scope 2 at $DIR/union.rs:15:19: 15:24
-          _3 = const ();                   // scope 3 at $SRC_DIR/libcore/mem/mod.rs:LL:COL
-                                           // ty::Const
-                                           // + ty: ()
-                                           // + val: Value(Scalar(<ZST>))
-                                           // mir::Constant
-                                           // + span: $SRC_DIR/libcore/mem/mod.rs:LL:COL
-                                           // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
-          drop(_4) -> bb2;                 // scope 3 at $SRC_DIR/libcore/mem/mod.rs:LL:COL
+          _3 = const ();                   // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+          drop(_4) -> bb2;                 // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
       }
   
       bb2: {
           StorageDead(_4);                 // scope 1 at $DIR/union.rs:15:26: 15:27
           StorageDead(_3);                 // scope 1 at $DIR/union.rs:15:27: 15:28
           _0 = const ();                   // scope 0 at $DIR/union.rs:8:11: 16:2
-                                           // ty::Const
-                                           // + ty: ()
-                                           // + val: Value(Scalar(<ZST>))
-                                           // mir::Constant
-                                           // + span: $DIR/union.rs:8:11: 16:2
-                                           // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
           StorageDead(_1);                 // scope 0 at $DIR/union.rs:16:1: 16:2
           return;                          // scope 0 at $DIR/union.rs:16:2: 16:2
       }
diff --git a/src/test/mir-opt/dest-prop/union.rs b/src/test/mir-opt/dest-prop/union.rs
index ea836412404..b9d831389e8 100644
--- a/src/test/mir-opt/dest-prop/union.rs
+++ b/src/test/mir-opt/dest-prop/union.rs
@@ -4,7 +4,7 @@ fn val() -> u32 {
     1
 }
 
-// EMIT_MIR rustc.main.DestinationPropagation.diff
+// EMIT_MIR union.main.DestinationPropagation.diff
 fn main() {
     union Un {
         us: u32,