about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.rs15
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir231
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir95
-rw-r--r--tests/mir-opt/slice_filter.rs20
-rw-r--r--tests/mir-opt/slice_filter.variant_a-{closure#0}.CopyProp.diff279
-rw-r--r--tests/mir-opt/slice_filter.variant_a-{closure#0}.DestinationPropagation.diff165
-rw-r--r--tests/mir-opt/slice_filter.variant_a-{closure#0}.ReferencePropagation.diff267
-rw-r--r--tests/mir-opt/slice_filter.variant_b-{closure#0}.CopyProp.diff139
-rw-r--r--tests/mir-opt/slice_filter.variant_b-{closure#0}.DestinationPropagation.diff109
-rw-r--r--tests/mir-opt/slice_filter.variant_b-{closure#0}.ReferencePropagation.diff103
10 files changed, 341 insertions, 1082 deletions
diff --git a/tests/mir-opt/pre-codegen/slice_filter.rs b/tests/mir-opt/pre-codegen/slice_filter.rs
new file mode 100644
index 00000000000..aba951acdd0
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_filter.rs
@@ -0,0 +1,15 @@
+// compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
+// ignore-debug: standard library debug assertions add a panic that breaks this optimization
+
+#![crate_type = "lib"]
+
+pub fn variant_a(input: &[(usize, usize, usize, usize)]) -> usize {
+    input.iter().filter(|(a, b, c, d)| a <= c && d <= b || c <= a && b <= d).count()
+}
+
+pub fn variant_b(input: &[(usize, usize, usize, usize)]) -> usize {
+    input.iter().filter(|&&(a, b, c, d)| a <= c && d <= b || c <= a && b <= d).count()
+}
+
+// EMIT_MIR slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
+// EMIT_MIR slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
new file mode 100644
index 00000000000..492cb022bed
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
@@ -0,0 +1,231 @@
+// MIR for `variant_a::{closure#0}` after PreCodegen
+
+fn variant_a::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:7:25: 7:39], _2: &&(usize, usize, usize, usize)) -> bool {
+    let mut _0: bool;                    // return place in scope 0 at $DIR/slice_filter.rs:+0:40: +0:40
+    let mut _3: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
+    let _4: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
+    let mut _5: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
+    let _6: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
+    let mut _7: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
+    let _8: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
+    let mut _9: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
+    let _10: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
+    let mut _11: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:41
+    let _12: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:45: +0:46
+    let mut _13: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:45: +0:46
+    let mut _18: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:46
+    let mut _19: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:56
+    let mut _20: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:50: +0:51
+    let _21: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:55: +0:56
+    let mut _22: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:55: +0:56
+    let mut _27: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:50: +0:56
+    let mut _28: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:61
+    let _29: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:65: +0:66
+    let mut _30: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:65: +0:66
+    let mut _35: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:66
+    let mut _36: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:76
+    let mut _37: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:70: +0:71
+    let _38: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+    let mut _39: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+    let mut _44: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:70: +0:76
+    scope 1 {
+        debug a => _4;                   // in scope 1 at $DIR/slice_filter.rs:+0:27: +0:28
+        debug b => _6;                   // in scope 1 at $DIR/slice_filter.rs:+0:30: +0:31
+        debug c => _8;                   // in scope 1 at $DIR/slice_filter.rs:+0:33: +0:34
+        debug d => _10;                  // in scope 1 at $DIR/slice_filter.rs:+0:36: +0:37
+        scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:7:40: 7:46
+            debug self => _11;           // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            debug other => _13;          // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            let mut _14: &usize;         // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            let mut _15: &usize;         // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            scope 3 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
+                debug self => _14;       // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                debug other => _15;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                let mut _16: usize;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                let mut _17: usize;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            }
+        }
+        scope 4 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:7:60: 7:66
+            debug self => _28;           // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            debug other => _30;          // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            let mut _31: &usize;         // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            let mut _32: &usize;         // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            scope 5 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
+                debug self => _31;       // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                debug other => _32;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                let mut _33: usize;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                let mut _34: usize;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            }
+        }
+        scope 6 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:7:50: 7:56
+            debug self => _20;           // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            debug other => _22;          // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            let mut _23: &usize;         // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            let mut _24: &usize;         // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            scope 7 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
+                debug self => _23;       // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                debug other => _24;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                let mut _25: usize;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                let mut _26: usize;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            }
+        }
+        scope 8 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:7:70: 7:76
+            debug self => _37;           // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            debug other => _39;          // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            let mut _40: &usize;         // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            let mut _41: &usize;         // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            scope 9 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
+                debug self => _40;       // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                debug other => _41;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                let mut _42: usize;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                let mut _43: usize;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+            }
+        }
+    }
+
+    bb0: {
+        StorageLive(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
+        _3 = deref_copy (*_2);           // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
+        _4 = &((*_3).0: usize);          // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
+        StorageLive(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
+        _5 = deref_copy (*_2);           // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
+        _6 = &((*_5).1: usize);          // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
+        StorageLive(_8);                 // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
+        _7 = deref_copy (*_2);           // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
+        _8 = &((*_7).2: usize);          // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
+        StorageLive(_10);                // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
+        _9 = deref_copy (*_2);           // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
+        _10 = &((*_9).3: usize);         // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
+        StorageLive(_19);                // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
+        StorageLive(_18);                // scope 1 at $DIR/slice_filter.rs:+0:40: +0:46
+        StorageLive(_11);                // scope 1 at $DIR/slice_filter.rs:+0:40: +0:41
+        _11 = &_4;                       // scope 1 at $DIR/slice_filter.rs:+0:40: +0:41
+        StorageLive(_13);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+        StorageLive(_12);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+        _12 = _8;                        // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+        _13 = &_12;                      // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+        _14 = deref_copy (*_11);         // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _15 = deref_copy (*_13);         // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageLive(_16);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _16 = (*_14);                    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageLive(_17);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _17 = (*_15);                    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _18 = Le(move _16, move _17);    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_17);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_16);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_12);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+        StorageDead(_13);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+        StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+        switchInt(move _18) -> [0: bb1, otherwise: bb2]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
+    }
+
+    bb1: {
+        _19 = const false;               // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
+        goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
+    }
+
+    bb2: {
+        StorageLive(_27);                // scope 1 at $DIR/slice_filter.rs:+0:50: +0:56
+        StorageLive(_20);                // scope 1 at $DIR/slice_filter.rs:+0:50: +0:51
+        _20 = &_10;                      // scope 1 at $DIR/slice_filter.rs:+0:50: +0:51
+        StorageLive(_22);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+        StorageLive(_21);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+        _21 = _6;                        // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+        _22 = &_21;                      // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+        _23 = deref_copy (*_20);         // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _24 = deref_copy (*_22);         // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageLive(_25);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _25 = (*_23);                    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageLive(_26);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _26 = (*_24);                    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _27 = Le(move _25, move _26);    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_26);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_25);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_21);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+        StorageDead(_22);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+        StorageDead(_20);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+        _19 = move _27;                  // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
+        goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
+    }
+
+    bb3: {
+        StorageDead(_27);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+        StorageDead(_18);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+        switchInt(move _19) -> [0: bb4, otherwise: bb8]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
+    }
+
+    bb4: {
+        StorageLive(_36);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+        StorageLive(_35);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:66
+        StorageLive(_28);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:61
+        _28 = &_8;                       // scope 1 at $DIR/slice_filter.rs:+0:60: +0:61
+        StorageLive(_30);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+        StorageLive(_29);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+        _29 = _4;                        // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+        _30 = &_29;                      // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+        _31 = deref_copy (*_28);         // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _32 = deref_copy (*_30);         // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageLive(_33);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _33 = (*_31);                    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageLive(_34);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _34 = (*_32);                    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _35 = Le(move _33, move _34);    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_34);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_33);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_29);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+        StorageDead(_30);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+        StorageDead(_28);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+        switchInt(move _35) -> [0: bb5, otherwise: bb6]; // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+    }
+
+    bb5: {
+        _36 = const false;               // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+        goto -> bb7;                     // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+    }
+
+    bb6: {
+        StorageLive(_44);                // scope 1 at $DIR/slice_filter.rs:+0:70: +0:76
+        StorageLive(_37);                // scope 1 at $DIR/slice_filter.rs:+0:70: +0:71
+        _37 = &_6;                       // scope 1 at $DIR/slice_filter.rs:+0:70: +0:71
+        StorageLive(_39);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+        StorageLive(_38);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+        _38 = _10;                       // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+        _39 = &_38;                      // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+        _40 = deref_copy (*_37);         // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _41 = deref_copy (*_39);         // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageLive(_42);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _42 = (*_40);                    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageLive(_43);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _43 = (*_41);                    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        _44 = Le(move _42, move _43);    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_43);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_42);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+        StorageDead(_38);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+        StorageDead(_39);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+        StorageDead(_37);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+        _36 = move _44;                  // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+        goto -> bb7;                     // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+    }
+
+    bb7: {
+        StorageDead(_44);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+        StorageDead(_35);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+        _0 = move _36;                   // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
+        goto -> bb9;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
+    }
+
+    bb8: {
+        _0 = const true;                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
+        goto -> bb9;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
+    }
+
+    bb9: {
+        StorageDead(_36);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+        StorageDead(_19);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+        StorageDead(_10);                // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+        StorageDead(_8);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+        StorageDead(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+        StorageDead(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+        return;                          // scope 0 at $DIR/slice_filter.rs:+0:76: +0:76
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
new file mode 100644
index 00000000000..8ab69bc7b27
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
@@ -0,0 +1,95 @@
+// MIR for `variant_b::{closure#0}` after PreCodegen
+
+fn variant_b::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:11:25: 11:41], _2: &&(usize, usize, usize, usize)) -> bool {
+    let mut _0: bool;                    // return place in scope 0 at $DIR/slice_filter.rs:+0:42: +0:42
+    let mut _3: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
+    let _4: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
+    let mut _5: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
+    let _6: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
+    let mut _7: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
+    let _8: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
+    let mut _9: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
+    let _10: usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
+    let mut _11: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:48
+    let mut _12: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:58
+    let mut _13: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:52: +0:58
+    let mut _14: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:68
+    let mut _15: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:78
+    let mut _16: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:72: +0:78
+    scope 1 {
+        debug a => _4;                   // in scope 1 at $DIR/slice_filter.rs:+0:29: +0:30
+        debug b => _6;                   // in scope 1 at $DIR/slice_filter.rs:+0:32: +0:33
+        debug c => _8;                   // in scope 1 at $DIR/slice_filter.rs:+0:35: +0:36
+        debug d => _10;                  // in scope 1 at $DIR/slice_filter.rs:+0:38: +0:39
+    }
+
+    bb0: {
+        _3 = deref_copy (*_2);           // scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
+        _4 = ((*_3).0: usize);           // scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
+        _5 = deref_copy (*_2);           // scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
+        _6 = ((*_5).1: usize);           // scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
+        _7 = deref_copy (*_2);           // scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
+        _8 = ((*_7).2: usize);           // scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
+        _9 = deref_copy (*_2);           // scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
+        _10 = ((*_9).3: usize);          // scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
+        StorageLive(_12);                // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
+        StorageLive(_11);                // scope 1 at $DIR/slice_filter.rs:+0:42: +0:48
+        _11 = Le(_4, _8);                // scope 1 at $DIR/slice_filter.rs:+0:42: +0:48
+        switchInt(move _11) -> [0: bb1, otherwise: bb2]; // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
+    }
+
+    bb1: {
+        _12 = const false;               // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
+        goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
+    }
+
+    bb2: {
+        StorageLive(_13);                // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
+        _13 = Le(_10, _6);               // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
+        _12 = move _13;                  // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
+        goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
+    }
+
+    bb3: {
+        StorageDead(_13);                // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
+        StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
+        switchInt(move _12) -> [0: bb4, otherwise: bb8]; // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
+    }
+
+    bb4: {
+        StorageLive(_15);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+        StorageLive(_14);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:68
+        _14 = Le(_8, _4);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:68
+        switchInt(move _14) -> [0: bb5, otherwise: bb6]; // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+    }
+
+    bb5: {
+        _15 = const false;               // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+        goto -> bb7;                     // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+    }
+
+    bb6: {
+        StorageLive(_16);                // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
+        _16 = Le(_6, _10);               // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
+        _15 = move _16;                  // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+        goto -> bb7;                     // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+    }
+
+    bb7: {
+        StorageDead(_16);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
+        StorageDead(_14);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
+        _0 = move _15;                   // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
+        goto -> bb9;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
+    }
+
+    bb8: {
+        _0 = const true;                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
+        goto -> bb9;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
+    }
+
+    bb9: {
+        StorageDead(_15);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
+        StorageDead(_12);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
+        return;                          // scope 0 at $DIR/slice_filter.rs:+0:78: +0:78
+    }
+}
diff --git a/tests/mir-opt/slice_filter.rs b/tests/mir-opt/slice_filter.rs
deleted file mode 100644
index be32f40f132..00000000000
--- a/tests/mir-opt/slice_filter.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-fn main() {
-    let input = vec![];
-    let _variant_a_result = variant_a(&input);
-    let _variant_b_result = variant_b(&input);
-}
-
-pub fn variant_a(input: &[(usize, usize, usize, usize)]) -> usize {
-    input.iter().filter(|(a, b, c, d)| a <= c && d <= b || c <= a && b <= d).count()
-}
-
-pub fn variant_b(input: &[(usize, usize, usize, usize)]) -> usize {
-    input.iter().filter(|&&(a, b, c, d)| a <= c && d <= b || c <= a && b <= d).count()
-}
-
-// EMIT_MIR slice_filter.variant_a-{closure#0}.ReferencePropagation.diff
-// EMIT_MIR slice_filter.variant_a-{closure#0}.CopyProp.diff
-// EMIT_MIR slice_filter.variant_a-{closure#0}.DestinationPropagation.diff
-// EMIT_MIR slice_filter.variant_b-{closure#0}.CopyProp.diff
-// EMIT_MIR slice_filter.variant_b-{closure#0}.ReferencePropagation.diff
-// EMIT_MIR slice_filter.variant_b-{closure#0}.DestinationPropagation.diff
diff --git a/tests/mir-opt/slice_filter.variant_a-{closure#0}.CopyProp.diff b/tests/mir-opt/slice_filter.variant_a-{closure#0}.CopyProp.diff
deleted file mode 100644
index 60e5056c7a9..00000000000
--- a/tests/mir-opt/slice_filter.variant_a-{closure#0}.CopyProp.diff
+++ /dev/null
@@ -1,279 +0,0 @@
-- // MIR for `variant_a::{closure#0}` before CopyProp
-+ // MIR for `variant_a::{closure#0}` after CopyProp
-  
-  fn variant_a::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:8:25: 8:39], _2: &&(usize, usize, usize, usize)) -> bool {
-      let mut _0: bool;                    // return place in scope 0 at $DIR/slice_filter.rs:+0:40: +0:40
-      let _3: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
-      let _4: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
-      let _5: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
-      let _6: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
-      let mut _7: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:56
-      let mut _8: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:46
-      let mut _9: &&usize;                 // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:41
-      let mut _10: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:45: +0:46
-      let _11: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:45: +0:46
-      let mut _12: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:50: +0:56
-      let mut _13: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:50: +0:51
-      let mut _14: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:55: +0:56
-      let _15: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:55: +0:56
-      let mut _16: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:76
-      let mut _17: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:66
-      let mut _18: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:61
-      let mut _19: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:65: +0:66
-      let _20: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:65: +0:66
-      let mut _21: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:70: +0:76
-      let mut _22: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:70: +0:71
-      let mut _23: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
-      let _24: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
-      let mut _25: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      let mut _26: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      let mut _27: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      let mut _28: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      let mut _31: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _32: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _37: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _38: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _43: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _44: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _49: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _50: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      scope 1 {
-          debug a => _3;                   // in scope 1 at $DIR/slice_filter.rs:+0:27: +0:28
-          debug b => _4;                   // in scope 1 at $DIR/slice_filter.rs:+0:30: +0:31
-          debug c => _5;                   // in scope 1 at $DIR/slice_filter.rs:+0:33: +0:34
-          debug d => _6;                   // in scope 1 at $DIR/slice_filter.rs:+0:36: +0:37
-          scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:40: 8:46
-              debug self => _9;            // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              debug other => _10;          // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _29: &usize;         // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _30: &usize;         // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 3 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug self => _31;       // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug other => _32;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug self => _29;       // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug other => _30;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _33: usize;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _34: usize;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-          scope 4 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:60: 8:66
-              debug self => _18;           // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              debug other => _19;          // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _35: &usize;         // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _36: &usize;         // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 5 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug self => _37;       // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug other => _38;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug self => _35;       // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug other => _36;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _39: usize;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _40: usize;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-          scope 6 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:50: 8:56
-              debug self => _13;           // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              debug other => _14;          // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _41: &usize;         // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _42: &usize;         // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 7 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug self => _43;       // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug other => _44;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug self => _41;       // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug other => _42;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _45: usize;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _46: usize;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-          scope 8 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:70: 8:76
-              debug self => _22;           // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              debug other => _23;          // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _47: &usize;         // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _48: &usize;         // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 9 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug self => _49;       // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug other => _50;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug self => _47;       // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug other => _48;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _51: usize;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _52: usize;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-      }
-  
-      bb0: {
-          StorageLive(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
-          _25 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
-          _3 = &((*_25).0: usize);         // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
-          StorageLive(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
-          _26 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
-          _4 = &((*_26).1: usize);         // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
-          StorageLive(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
-          _27 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
-          _5 = &((*_27).2: usize);         // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
-          StorageLive(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
-          _28 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
-          _6 = &((*_28).3: usize);         // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
-          StorageLive(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-          StorageLive(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:46
-          StorageLive(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:41
-          _9 = &_3;                        // scope 1 at $DIR/slice_filter.rs:+0:40: +0:41
-          StorageLive(_10);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          StorageLive(_11);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          _11 = _5;                        // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          _10 = &_11;                      // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          _29 = deref_copy (*_9);          // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _30 = deref_copy (*_10);         // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageLive(_31);                // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _31 = _29;                       // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageLive(_32);                // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _32 = _30;                       // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_33);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _33 = (*_31);                    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _33 = (*_29);                    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_34);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _34 = (*_32);                    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _34 = (*_30);                    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _8 = Le(move _33, move _34);     // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_34);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_33);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_32);                // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_31);                // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          StorageDead(_10);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          StorageDead(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          switchInt(move _8) -> [0: bb4, otherwise: bb5]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-      }
-  
-      bb1: {
-          _0 = const true;                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-      }
-  
-      bb2: {
-          StorageLive(_16);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-          StorageLive(_17);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:66
-          StorageLive(_18);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:61
-          _18 = &_5;                       // scope 1 at $DIR/slice_filter.rs:+0:60: +0:61
-          StorageLive(_19);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          StorageLive(_20);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          _20 = _3;                        // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          _19 = &_20;                      // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          _35 = deref_copy (*_18);         // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _36 = deref_copy (*_19);         // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageLive(_37);                // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _37 = _35;                       // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageLive(_38);                // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _38 = _36;                       // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_39);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _39 = (*_37);                    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _39 = (*_35);                    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_40);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _40 = (*_38);                    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _40 = (*_36);                    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _17 = Le(move _39, move _40);    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_40);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_39);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_38);                // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_37);                // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_20);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          StorageDead(_19);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          StorageDead(_18);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          switchInt(move _17) -> [0: bb6, otherwise: bb7]; // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-      }
-  
-      bb3: {
-          StorageDead(_16);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageDead(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageDead(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageDead(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageDead(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageDead(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
-          return;                          // scope 0 at $DIR/slice_filter.rs:+0:76: +0:76
-      }
-  
-      bb4: {
-          _7 = const false;                // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-          StorageDead(_12);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          goto -> bb2;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-      }
-  
-      bb5: {
-          StorageLive(_12);                // scope 1 at $DIR/slice_filter.rs:+0:50: +0:56
-          StorageLive(_13);                // scope 1 at $DIR/slice_filter.rs:+0:50: +0:51
-          _13 = &_6;                       // scope 1 at $DIR/slice_filter.rs:+0:50: +0:51
-          StorageLive(_14);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          StorageLive(_15);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          _15 = _4;                        // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          _14 = &_15;                      // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          _41 = deref_copy (*_13);         // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _42 = deref_copy (*_14);         // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageLive(_43);                // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _43 = _41;                       // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageLive(_44);                // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _44 = _42;                       // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_45);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _45 = (*_43);                    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _45 = (*_41);                    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_46);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _46 = (*_44);                    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _46 = (*_42);                    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _12 = Le(move _45, move _46);    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_46);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_45);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_44);                // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_43);                // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_15);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          StorageDead(_14);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          StorageDead(_13);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          _7 = move _12;                   // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-          StorageDead(_12);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          switchInt(move _7) -> [0: bb2, otherwise: bb1]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-      }
-  
-      bb6: {
-          _16 = const false;               // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-      }
-  
-      bb7: {
-          StorageLive(_21);                // scope 1 at $DIR/slice_filter.rs:+0:70: +0:76
-          StorageLive(_22);                // scope 1 at $DIR/slice_filter.rs:+0:70: +0:71
-          _22 = &_4;                       // scope 1 at $DIR/slice_filter.rs:+0:70: +0:71
-          StorageLive(_23);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageLive(_24);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          _24 = _6;                        // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          _23 = &_24;                      // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          _47 = deref_copy (*_22);         // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _48 = deref_copy (*_23);         // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageLive(_49);                // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _49 = _47;                       // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageLive(_50);                // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _50 = _48;                       // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_51);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _51 = (*_49);                    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _51 = (*_47);                    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_52);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _52 = (*_50);                    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _52 = (*_48);                    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _21 = Le(move _51, move _52);    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_52);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_51);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_50);                // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_49);                // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_24);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageDead(_23);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageDead(_22);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          _16 = move _21;                  // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-      }
-  
-      bb8: {
-          StorageDead(_21);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageDead(_17);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          _0 = move _16;                   // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-      }
-  }
-  
diff --git a/tests/mir-opt/slice_filter.variant_a-{closure#0}.DestinationPropagation.diff b/tests/mir-opt/slice_filter.variant_a-{closure#0}.DestinationPropagation.diff
deleted file mode 100644
index afdcf57815f..00000000000
--- a/tests/mir-opt/slice_filter.variant_a-{closure#0}.DestinationPropagation.diff
+++ /dev/null
@@ -1,165 +0,0 @@
-- // MIR for `variant_a::{closure#0}` before DestinationPropagation
-+ // MIR for `variant_a::{closure#0}` after DestinationPropagation
-  
-  fn variant_a::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:8:25: 8:39], _2: &&(usize, usize, usize, usize)) -> bool {
-      let mut _0: bool;                    // return place in scope 0 at $DIR/slice_filter.rs:+0:40: +0:40
-      let mut _3: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:56
-      let mut _4: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:46
-      let mut _5: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:50: +0:56
-      let mut _6: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:76
-      let mut _7: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:66
-      let mut _8: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:70: +0:76
-      let mut _9: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      let mut _10: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      let mut _11: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      let mut _12: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      scope 1 {
-          debug a => &((*_9).0: usize);    // in scope 1 at $DIR/slice_filter.rs:+0:27: +0:28
-          debug b => &((*_10).1: usize);   // in scope 1 at $DIR/slice_filter.rs:+0:30: +0:31
-          debug c => &((*_11).2: usize);   // in scope 1 at $DIR/slice_filter.rs:+0:33: +0:34
-          debug d => &((*_12).3: usize);   // in scope 1 at $DIR/slice_filter.rs:+0:36: +0:37
-          scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:40: 8:46
-              debug self => &&((*_9).0: usize); // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              debug other => &&((*_11).2: usize); // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 3 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  debug self => &((*_9).0: usize); // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  debug other => &((*_11).2: usize); // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _13: usize;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _14: usize;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-          scope 4 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:60: 8:66
-              debug self => &&((*_11).2: usize); // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              debug other => &&((*_9).0: usize); // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 5 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  debug self => &((*_11).2: usize); // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  debug other => &((*_9).0: usize); // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _15: usize;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _16: usize;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-          scope 6 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:50: 8:56
-              debug self => &&((*_12).3: usize); // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              debug other => &&((*_10).1: usize); // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 7 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  debug self => &((*_12).3: usize); // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  debug other => &((*_10).1: usize); // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _17: usize;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _18: usize;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-          scope 8 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:70: 8:76
-              debug self => &&((*_10).1: usize); // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              debug other => &&((*_12).3: usize); // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 9 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  debug self => &((*_10).1: usize); // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  debug other => &((*_12).3: usize); // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _19: usize;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _20: usize;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-      }
-  
-      bb0: {
-          _9 = deref_copy (*_2);           // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
-          _10 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
-          _11 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
-          _12 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
--         StorageLive(_3);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-          StorageLive(_4);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:46
-          StorageLive(_13);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _13 = ((*_9).0: usize);          // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_14);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _14 = ((*_11).2: usize);         // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _4 = Le(move _13, move _14);     // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_14);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_13);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          switchInt(move _4) -> [0: bb4, otherwise: bb5]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-      }
-  
-      bb1: {
-          _0 = const true;                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-      }
-  
-      bb2: {
--         StorageLive(_6);                 // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-          StorageLive(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:60: +0:66
-          StorageLive(_15);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _15 = ((*_11).2: usize);         // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_16);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _16 = ((*_9).0: usize);          // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _7 = Le(move _15, move _16);     // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_16);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_15);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          switchInt(move _7) -> [0: bb6, otherwise: bb7]; // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-      }
-  
-      bb3: {
--         StorageDead(_6);                 // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageDead(_3);                 // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          return;                          // scope 0 at $DIR/slice_filter.rs:+0:76: +0:76
-      }
-  
-      bb4: {
--         StorageDead(_5);                 // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          StorageDead(_4);                 // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          goto -> bb2;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-      }
-  
-      bb5: {
--         StorageLive(_5);                 // scope 1 at $DIR/slice_filter.rs:+0:50: +0:56
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:50: +0:56
-          StorageLive(_17);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _17 = ((*_12).3: usize);         // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_18);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _18 = ((*_10).1: usize);         // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _5 = Le(move _17, move _18);     // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_18);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_17);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _3 = move _5;                    // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
--         StorageDead(_5);                 // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          StorageDead(_4);                 // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
--         switchInt(move _3) -> [0: bb2, otherwise: bb1]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-+         switchInt(move _5) -> [0: bb2, otherwise: bb1]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-      }
-  
-      bb6: {
--         _6 = const false;                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-+         _0 = const false;                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-      }
-  
-      bb7: {
--         StorageLive(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:70: +0:76
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:70: +0:76
-          StorageLive(_19);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _19 = ((*_10).1: usize);         // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_20);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _20 = ((*_12).3: usize);         // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _8 = Le(move _19, move _20);     // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _0 = Le(move _19, move _20);     // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_20);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_19);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _6 = move _8;                    // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-      }
-  
-      bb8: {
--         StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageDead(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
--         _0 = move _6;                    // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-      }
-  }
-  
diff --git a/tests/mir-opt/slice_filter.variant_a-{closure#0}.ReferencePropagation.diff b/tests/mir-opt/slice_filter.variant_a-{closure#0}.ReferencePropagation.diff
deleted file mode 100644
index 2534eeef432..00000000000
--- a/tests/mir-opt/slice_filter.variant_a-{closure#0}.ReferencePropagation.diff
+++ /dev/null
@@ -1,267 +0,0 @@
-- // MIR for `variant_a::{closure#0}` before ReferencePropagation
-+ // MIR for `variant_a::{closure#0}` after ReferencePropagation
-  
-  fn variant_a::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:8:25: 8:39], _2: &&(usize, usize, usize, usize)) -> bool {
-      let mut _0: bool;                    // return place in scope 0 at $DIR/slice_filter.rs:+0:40: +0:40
-      let _3: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
-      let _4: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
-      let _5: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
-      let _6: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
-      let mut _7: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:56
-      let mut _8: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:46
-      let mut _9: &&usize;                 // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:41
-      let mut _10: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:45: +0:46
-      let _11: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:45: +0:46
-      let mut _12: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:50: +0:56
-      let mut _13: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:50: +0:51
-      let mut _14: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:55: +0:56
-      let _15: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:55: +0:56
-      let mut _16: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:76
-      let mut _17: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:66
-      let mut _18: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:61
-      let mut _19: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:65: +0:66
-      let _20: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:65: +0:66
-      let mut _21: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:70: +0:76
-      let mut _22: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:70: +0:71
-      let mut _23: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
-      let _24: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
-      let mut _25: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      let mut _26: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      let mut _27: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      let mut _28: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
-      let mut _31: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _32: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _37: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _38: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _43: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _44: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _49: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      let mut _50: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
-      scope 1 {
--         debug a => _3;                   // in scope 1 at $DIR/slice_filter.rs:+0:27: +0:28
--         debug b => _4;                   // in scope 1 at $DIR/slice_filter.rs:+0:30: +0:31
--         debug c => _5;                   // in scope 1 at $DIR/slice_filter.rs:+0:33: +0:34
--         debug d => _6;                   // in scope 1 at $DIR/slice_filter.rs:+0:36: +0:37
-+         debug a => &((*_25).0: usize);   // in scope 1 at $DIR/slice_filter.rs:+0:27: +0:28
-+         debug b => &((*_26).1: usize);   // in scope 1 at $DIR/slice_filter.rs:+0:30: +0:31
-+         debug c => &((*_27).2: usize);   // in scope 1 at $DIR/slice_filter.rs:+0:33: +0:34
-+         debug d => &((*_28).3: usize);   // in scope 1 at $DIR/slice_filter.rs:+0:36: +0:37
-          scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:40: 8:46
--             debug self => _9;            // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
--             debug other => _10;          // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+             debug self => &&((*_25).0: usize); // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+             debug other => &&((*_27).2: usize); // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _29: &usize;         // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _30: &usize;         // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 3 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug self => _29;       // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug other => _30;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug self => &((*_25).0: usize); // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug other => &((*_27).2: usize); // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _33: usize;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _34: usize;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-          scope 4 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:60: 8:66
--             debug self => _18;           // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
--             debug other => _19;          // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+             debug self => &&((*_27).2: usize); // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+             debug other => &&((*_25).0: usize); // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _35: &usize;         // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _36: &usize;         // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 5 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug self => _35;       // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug other => _36;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug self => &((*_27).2: usize); // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug other => &((*_25).0: usize); // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _39: usize;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _40: usize;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-          scope 6 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:50: 8:56
--             debug self => _13;           // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
--             debug other => _14;          // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+             debug self => &&((*_28).3: usize); // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+             debug other => &&((*_26).1: usize); // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _41: &usize;         // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _42: &usize;         // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 7 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug self => _41;       // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug other => _42;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug self => &((*_28).3: usize); // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug other => &((*_26).1: usize); // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _45: usize;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _46: usize;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-          scope 8 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:70: 8:76
--             debug self => _22;           // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
--             debug other => _23;          // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+             debug self => &&((*_26).1: usize); // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+             debug other => &&((*_28).3: usize); // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _47: &usize;         // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              let mut _48: &usize;         // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              scope 9 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug self => _47;       // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
--                 debug other => _48;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug self => &((*_26).1: usize); // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+                 debug other => &((*_28).3: usize); // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _51: usize;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-                  let mut _52: usize;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-              }
-          }
-      }
-  
-      bb0: {
--         StorageLive(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
-          _25 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
--         _3 = &((*_25).0: usize);         // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
--         StorageLive(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
-          _26 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
--         _4 = &((*_26).1: usize);         // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
--         StorageLive(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
-          _27 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
--         _5 = &((*_27).2: usize);         // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
--         StorageLive(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
-          _28 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
--         _6 = &((*_28).3: usize);         // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
-          StorageLive(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-          StorageLive(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:46
--         StorageLive(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:41
--         _9 = &_3;                        // scope 1 at $DIR/slice_filter.rs:+0:40: +0:41
--         StorageLive(_10);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
--         StorageLive(_11);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
--         _11 = _5;                        // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
--         _10 = &_11;                      // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
--         _29 = deref_copy (*_9);          // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _30 = deref_copy (*_10);         // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_33);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _33 = (*_29);                    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _33 = ((*_25).0: usize);         // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_34);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _34 = (*_30);                    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _34 = ((*_27).2: usize);         // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _8 = Le(move _33, move _34);     // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_34);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_33);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
--         StorageDead(_10);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
--         StorageDead(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          switchInt(move _8) -> [0: bb4, otherwise: bb5]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-      }
-  
-      bb1: {
-          _0 = const true;                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-      }
-  
-      bb2: {
-          StorageLive(_16);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-          StorageLive(_17);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:66
--         StorageLive(_18);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:61
--         _18 = &_5;                       // scope 1 at $DIR/slice_filter.rs:+0:60: +0:61
--         StorageLive(_19);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
--         StorageLive(_20);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
--         _20 = _3;                        // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
--         _19 = &_20;                      // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
--         _35 = deref_copy (*_18);         // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _36 = deref_copy (*_19);         // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_39);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _39 = (*_35);                    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _39 = ((*_27).2: usize);         // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_40);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _40 = (*_36);                    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _40 = ((*_25).0: usize);         // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _17 = Le(move _39, move _40);    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_40);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_39);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_20);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
--         StorageDead(_19);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
--         StorageDead(_18);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          switchInt(move _17) -> [0: bb6, otherwise: bb7]; // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-      }
-  
-      bb3: {
-          StorageDead(_16);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageDead(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageDead(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageDead(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageDead(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageDead(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
-          return;                          // scope 0 at $DIR/slice_filter.rs:+0:76: +0:76
-      }
-  
-      bb4: {
-          _7 = const false;                // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-          StorageDead(_12);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          goto -> bb2;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-      }
-  
-      bb5: {
-          StorageLive(_12);                // scope 1 at $DIR/slice_filter.rs:+0:50: +0:56
--         StorageLive(_13);                // scope 1 at $DIR/slice_filter.rs:+0:50: +0:51
--         _13 = &_6;                       // scope 1 at $DIR/slice_filter.rs:+0:50: +0:51
--         StorageLive(_14);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
--         StorageLive(_15);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
--         _15 = _4;                        // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
--         _14 = &_15;                      // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
--         _41 = deref_copy (*_13);         // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _42 = deref_copy (*_14);         // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_45);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _45 = (*_41);                    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _45 = ((*_28).3: usize);         // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_46);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _46 = (*_42);                    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _46 = ((*_26).1: usize);         // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _12 = Le(move _45, move _46);    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_46);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_45);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_15);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
--         StorageDead(_14);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
--         StorageDead(_13);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          _7 = move _12;                   // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
-          StorageDead(_12);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          switchInt(move _7) -> [0: bb2, otherwise: bb1]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-      }
-  
-      bb6: {
-          _16 = const false;               // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-      }
-  
-      bb7: {
-          StorageLive(_21);                // scope 1 at $DIR/slice_filter.rs:+0:70: +0:76
--         StorageLive(_22);                // scope 1 at $DIR/slice_filter.rs:+0:70: +0:71
--         _22 = &_4;                       // scope 1 at $DIR/slice_filter.rs:+0:70: +0:71
--         StorageLive(_23);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageLive(_24);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
--         _24 = _6;                        // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
--         _23 = &_24;                      // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
--         _47 = deref_copy (*_22);         // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _48 = deref_copy (*_23);         // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_51);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _51 = (*_47);                    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _51 = ((*_26).1: usize);         // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageLive(_52);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         _52 = (*_48);                    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-+         _52 = ((*_28).3: usize);         // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _21 = Le(move _51, move _52);    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_52);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_51);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
--         StorageDead(_24);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageDead(_23);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageDead(_22);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          _16 = move _21;                  // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
-      }
-  
-      bb8: {
-          StorageDead(_21);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageDead(_17);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          _0 = move _16;                   // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
-      }
-  }
-  
diff --git a/tests/mir-opt/slice_filter.variant_b-{closure#0}.CopyProp.diff b/tests/mir-opt/slice_filter.variant_b-{closure#0}.CopyProp.diff
deleted file mode 100644
index 5e4bdbdfa2e..00000000000
--- a/tests/mir-opt/slice_filter.variant_b-{closure#0}.CopyProp.diff
+++ /dev/null
@@ -1,139 +0,0 @@
-- // MIR for `variant_b::{closure#0}` before CopyProp
-+ // MIR for `variant_b::{closure#0}` after CopyProp
-  
-  fn variant_b::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:12:25: 12:41], _2: &&(usize, usize, usize, usize)) -> bool {
-      let mut _0: bool;                    // return place in scope 0 at $DIR/slice_filter.rs:+0:42: +0:42
-      let _3: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
-      let _4: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
-      let _5: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
-      let _6: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
-      let mut _7: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:58
-      let mut _8: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:48
-      let mut _9: usize;                   // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:43
-      let mut _10: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:47: +0:48
-      let mut _11: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:52: +0:58
-      let mut _12: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:52: +0:53
-      let mut _13: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:57: +0:58
-      let mut _14: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:78
-      let mut _15: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:68
-      let mut _16: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:63
-      let mut _17: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:67: +0:68
-      let mut _18: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:72: +0:78
-      let mut _19: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:72: +0:73
-      let mut _20: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:77: +0:78
-      let mut _21: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      let mut _22: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      let mut _23: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      let mut _24: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      scope 1 {
-          debug a => _3;                   // in scope 1 at $DIR/slice_filter.rs:+0:29: +0:30
-          debug b => _4;                   // in scope 1 at $DIR/slice_filter.rs:+0:32: +0:33
-          debug c => _5;                   // in scope 1 at $DIR/slice_filter.rs:+0:35: +0:36
-          debug d => _6;                   // in scope 1 at $DIR/slice_filter.rs:+0:38: +0:39
-      }
-  
-      bb0: {
--         StorageLive(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
-          _21 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
-          _3 = ((*_21).0: usize);          // scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
--         StorageLive(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
-          _22 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
-          _4 = ((*_22).1: usize);          // scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
--         StorageLive(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
-          _23 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
-          _5 = ((*_23).2: usize);          // scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
--         StorageLive(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
-          _24 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
-          _6 = ((*_24).3: usize);          // scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
-          StorageLive(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-          StorageLive(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:48
--         StorageLive(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:43
--         _9 = _3;                         // scope 1 at $DIR/slice_filter.rs:+0:42: +0:43
--         StorageLive(_10);                // scope 1 at $DIR/slice_filter.rs:+0:47: +0:48
--         _10 = _5;                        // scope 1 at $DIR/slice_filter.rs:+0:47: +0:48
--         _8 = Le(move _9, move _10);      // scope 1 at $DIR/slice_filter.rs:+0:42: +0:48
--         StorageDead(_10);                // scope 1 at $DIR/slice_filter.rs:+0:47: +0:48
--         StorageDead(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:47: +0:48
-+         _8 = Le(_3, _5);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:48
-          switchInt(move _8) -> [0: bb4, otherwise: bb5]; // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-      }
-  
-      bb1: {
-          _0 = const true;                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-      }
-  
-      bb2: {
-          StorageLive(_14);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-          StorageLive(_15);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:68
--         StorageLive(_16);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:63
--         _16 = _5;                        // scope 1 at $DIR/slice_filter.rs:+0:62: +0:63
--         StorageLive(_17);                // scope 1 at $DIR/slice_filter.rs:+0:67: +0:68
--         _17 = _3;                        // scope 1 at $DIR/slice_filter.rs:+0:67: +0:68
--         _15 = Le(move _16, move _17);    // scope 1 at $DIR/slice_filter.rs:+0:62: +0:68
--         StorageDead(_17);                // scope 1 at $DIR/slice_filter.rs:+0:67: +0:68
--         StorageDead(_16);                // scope 1 at $DIR/slice_filter.rs:+0:67: +0:68
-+         _15 = Le(_5, _3);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:68
-          switchInt(move _15) -> [0: bb6, otherwise: bb7]; // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-      }
-  
-      bb3: {
-          StorageDead(_14);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-          StorageDead(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
--         StorageDead(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:77: +0:78
--         StorageDead(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:77: +0:78
--         StorageDead(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:77: +0:78
--         StorageDead(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:77: +0:78
-          return;                          // scope 0 at $DIR/slice_filter.rs:+0:78: +0:78
-      }
-  
-      bb4: {
-          _7 = const false;                // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-          StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-          goto -> bb2;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-      }
-  
-      bb5: {
-          StorageLive(_11);                // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
--         StorageLive(_12);                // scope 1 at $DIR/slice_filter.rs:+0:52: +0:53
--         _12 = _6;                        // scope 1 at $DIR/slice_filter.rs:+0:52: +0:53
--         StorageLive(_13);                // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
--         _13 = _4;                        // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
--         _11 = Le(move _12, move _13);    // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
--         StorageDead(_13);                // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
--         StorageDead(_12);                // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-+         _11 = Le(_6, _4);                // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
-          _7 = move _11;                   // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-          StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-          switchInt(move _7) -> [0: bb2, otherwise: bb1]; // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-      }
-  
-      bb6: {
-          _14 = const false;               // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-      }
-  
-      bb7: {
-          StorageLive(_18);                // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
--         StorageLive(_19);                // scope 1 at $DIR/slice_filter.rs:+0:72: +0:73
--         _19 = _4;                        // scope 1 at $DIR/slice_filter.rs:+0:72: +0:73
--         StorageLive(_20);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
--         _20 = _6;                        // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
--         _18 = Le(move _19, move _20);    // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
--         StorageDead(_20);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
--         StorageDead(_19);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-+         _18 = Le(_4, _6);                // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
-          _14 = move _18;                  // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-      }
-  
-      bb8: {
-          StorageDead(_18);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-          StorageDead(_15);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-          _0 = move _14;                   // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-      }
-  }
-  
diff --git a/tests/mir-opt/slice_filter.variant_b-{closure#0}.DestinationPropagation.diff b/tests/mir-opt/slice_filter.variant_b-{closure#0}.DestinationPropagation.diff
deleted file mode 100644
index 45af6600cd4..00000000000
--- a/tests/mir-opt/slice_filter.variant_b-{closure#0}.DestinationPropagation.diff
+++ /dev/null
@@ -1,109 +0,0 @@
-- // MIR for `variant_b::{closure#0}` before DestinationPropagation
-+ // MIR for `variant_b::{closure#0}` after DestinationPropagation
-  
-  fn variant_b::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:12:25: 12:41], _2: &&(usize, usize, usize, usize)) -> bool {
-      let mut _0: bool;                    // return place in scope 0 at $DIR/slice_filter.rs:+0:42: +0:42
-      let _3: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
-      let _4: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
-      let _5: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
-      let _6: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
-      let mut _7: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:58
-      let mut _8: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:48
-      let mut _9: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:52: +0:58
-      let mut _10: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:78
-      let mut _11: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:68
-      let mut _12: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:72: +0:78
-      let mut _13: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      let mut _14: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      let mut _15: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      let mut _16: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      scope 1 {
-          debug a => _3;                   // in scope 1 at $DIR/slice_filter.rs:+0:29: +0:30
-          debug b => _4;                   // in scope 1 at $DIR/slice_filter.rs:+0:32: +0:33
-          debug c => _5;                   // in scope 1 at $DIR/slice_filter.rs:+0:35: +0:36
-          debug d => _6;                   // in scope 1 at $DIR/slice_filter.rs:+0:38: +0:39
-      }
-  
-      bb0: {
-          _13 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
-          _3 = ((*_13).0: usize);          // scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
-          _14 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
-          _4 = ((*_14).1: usize);          // scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
-          _15 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
-          _5 = ((*_15).2: usize);          // scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
-          _16 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
-          _6 = ((*_16).3: usize);          // scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
--         StorageLive(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-          StorageLive(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:48
-          _8 = Le(_3, _5);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:48
-          switchInt(move _8) -> [0: bb4, otherwise: bb5]; // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-      }
-  
-      bb1: {
-          _0 = const true;                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-      }
-  
-      bb2: {
--         StorageLive(_10);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-          StorageLive(_11);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:68
-          _11 = Le(_5, _3);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:68
-          switchInt(move _11) -> [0: bb6, otherwise: bb7]; // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-      }
-  
-      bb3: {
--         StorageDead(_10);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
--         StorageDead(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-          return;                          // scope 0 at $DIR/slice_filter.rs:+0:78: +0:78
-      }
-  
-      bb4: {
--         StorageDead(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-          goto -> bb2;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-      }
-  
-      bb5: {
--         StorageLive(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
-          _9 = Le(_6, _4);                 // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
--         _7 = move _9;                    // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
--         StorageDead(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
--         switchInt(move _7) -> [0: bb2, otherwise: bb1]; // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-+         switchInt(move _9) -> [0: bb2, otherwise: bb1]; // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-      }
-  
-      bb6: {
--         _10 = const false;               // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-+         _0 = const false;                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-      }
-  
-      bb7: {
--         StorageLive(_12);                // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
--         _12 = Le(_4, _6);                // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
--         _10 = move _12;                  // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
-+         _0 = Le(_4, _6);                 // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-      }
-  
-      bb8: {
--         StorageDead(_12);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-          StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
--         _0 = move _10;                   // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-+         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-      }
-  }
-  
diff --git a/tests/mir-opt/slice_filter.variant_b-{closure#0}.ReferencePropagation.diff b/tests/mir-opt/slice_filter.variant_b-{closure#0}.ReferencePropagation.diff
deleted file mode 100644
index d1241c6b024..00000000000
--- a/tests/mir-opt/slice_filter.variant_b-{closure#0}.ReferencePropagation.diff
+++ /dev/null
@@ -1,103 +0,0 @@
-- // MIR for `variant_b::{closure#0}` before ReferencePropagation
-+ // MIR for `variant_b::{closure#0}` after ReferencePropagation
-  
-  fn variant_b::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:12:25: 12:41], _2: &&(usize, usize, usize, usize)) -> bool {
-      let mut _0: bool;                    // return place in scope 0 at $DIR/slice_filter.rs:+0:42: +0:42
-      let _3: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
-      let _4: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
-      let _5: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
-      let _6: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
-      let mut _7: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:58
-      let mut _8: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:48
-      let mut _9: usize;                   // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:43
-      let mut _10: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:47: +0:48
-      let mut _11: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:52: +0:58
-      let mut _12: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:52: +0:53
-      let mut _13: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:57: +0:58
-      let mut _14: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:78
-      let mut _15: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:68
-      let mut _16: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:63
-      let mut _17: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:67: +0:68
-      let mut _18: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:72: +0:78
-      let mut _19: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:72: +0:73
-      let mut _20: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:77: +0:78
-      let mut _21: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      let mut _22: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      let mut _23: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      let mut _24: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
-      scope 1 {
-          debug a => _3;                   // in scope 1 at $DIR/slice_filter.rs:+0:29: +0:30
-          debug b => _4;                   // in scope 1 at $DIR/slice_filter.rs:+0:32: +0:33
-          debug c => _5;                   // in scope 1 at $DIR/slice_filter.rs:+0:35: +0:36
-          debug d => _6;                   // in scope 1 at $DIR/slice_filter.rs:+0:38: +0:39
-      }
-  
-      bb0: {
-          _21 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
-          _3 = ((*_21).0: usize);          // scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
-          _22 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
-          _4 = ((*_22).1: usize);          // scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
-          _23 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
-          _5 = ((*_23).2: usize);          // scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
-          _24 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
-          _6 = ((*_24).3: usize);          // scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
-          StorageLive(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-          StorageLive(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:48
-          _8 = Le(_3, _5);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:48
-          switchInt(move _8) -> [0: bb4, otherwise: bb5]; // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-      }
-  
-      bb1: {
-          _0 = const true;                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-      }
-  
-      bb2: {
-          StorageLive(_14);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-          StorageLive(_15);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:68
-          _15 = Le(_5, _3);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:68
-          switchInt(move _15) -> [0: bb6, otherwise: bb7]; // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-      }
-  
-      bb3: {
-          StorageDead(_14);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-          StorageDead(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-          return;                          // scope 0 at $DIR/slice_filter.rs:+0:78: +0:78
-      }
-  
-      bb4: {
-          _7 = const false;                // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-          StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-          goto -> bb2;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-      }
-  
-      bb5: {
-          StorageLive(_11);                // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
-          _11 = Le(_6, _4);                // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
-          _7 = move _11;                   // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
-          StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
-          switchInt(move _7) -> [0: bb2, otherwise: bb1]; // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-      }
-  
-      bb6: {
-          _14 = const false;               // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-      }
-  
-      bb7: {
-          StorageLive(_18);                // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
-          _18 = Le(_4, _6);                // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
-          _14 = move _18;                  // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
-      }
-  
-      bb8: {
-          StorageDead(_18);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-          StorageDead(_15);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
-          _0 = move _14;                   // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
-      }
-  }
-