From 05d7a60ff89cd30f2aa7613ffb925a1fb143b7e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Fischer?= Date: Mon, 27 Apr 2020 19:05:44 -0400 Subject: [PATCH] Changed `simplify_match` output query because it had become outdated --- src/test/mir-opt/simplify_match.rs | 2 +- ...py-prop.diff => rustc.main.ConstProp.diff} | 28 ++++++++++++------- 2 files changed, 19 insertions(+), 11 deletions(-) rename src/test/mir-opt/simplify_match/{rustc.main.SimplifyBranches-after-copy-prop.diff => rustc.main.ConstProp.diff} (69%) diff --git a/src/test/mir-opt/simplify_match.rs b/src/test/mir-opt/simplify_match.rs index 233f9ff4c400..b8e1ea6f981f 100644 --- a/src/test/mir-opt/simplify_match.rs +++ b/src/test/mir-opt/simplify_match.rs @@ -1,7 +1,7 @@ #[inline(never)] fn noop() {} -// EMIT_MIR rustc.main.SimplifyBranches-after-copy-prop.diff +// EMIT_MIR rustc.main.ConstProp.diff fn main() { match { let x = false; x } { true => noop(), diff --git a/src/test/mir-opt/simplify_match/rustc.main.SimplifyBranches-after-copy-prop.diff b/src/test/mir-opt/simplify_match/rustc.main.ConstProp.diff similarity index 69% rename from src/test/mir-opt/simplify_match/rustc.main.SimplifyBranches-after-copy-prop.diff rename to src/test/mir-opt/simplify_match/rustc.main.ConstProp.diff index ae6dfae30b97..8003112c46c4 100644 --- a/src/test/mir-opt/simplify_match/rustc.main.SimplifyBranches-after-copy-prop.diff +++ b/src/test/mir-opt/simplify_match/rustc.main.ConstProp.diff @@ -1,5 +1,5 @@ -- // MIR for `main` before SimplifyBranches-after-copy-prop -+ // MIR for `main` after SimplifyBranches-after-copy-prop +- // MIR for `main` before ConstProp ++ // MIR for `main` after ConstProp fn main() -> () { let mut _0: (); // return place in scope 0 at $DIR/simplify_match.rs:5:11: 5:11 @@ -19,15 +19,23 @@ // mir::Constant // + span: $DIR/simplify_match.rs:6:21: 6:26 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - _1 = const false; // scope 1 at $DIR/simplify_match.rs:6:28: 6:29 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/simplify_match.rs:6:28: 6:29 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } +- _1 = _2; // scope 1 at $DIR/simplify_match.rs:6:28: 6:29 ++ _1 = const false; // scope 1 at $DIR/simplify_match.rs:6:28: 6:29 ++ // ty::Const ++ // + ty: bool ++ // + val: Value(Scalar(0x00)) ++ // mir::Constant ++ // + span: $DIR/simplify_match.rs:6:28: 6:29 ++ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } StorageDead(_2); // scope 0 at $DIR/simplify_match.rs:6:30: 6:31 - goto -> bb1; // scope 0 at $DIR/simplify_match.rs:7:9: 7:13 +- switchInt(_1) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_match.rs:7:9: 7:13 ++ switchInt(const false) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_match.rs:7:9: 7:13 ++ // ty::Const ++ // + ty: bool ++ // + val: Value(Scalar(0x00)) ++ // mir::Constant ++ // + span: $DIR/simplify_match.rs:7:9: 7:13 ++ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } } bb1: {