summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/boolean_identities.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/const_prop/boolean_identities.rs')
-rw-r--r--tests/mir-opt/const_prop/boolean_identities.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/mir-opt/const_prop/boolean_identities.rs b/tests/mir-opt/const_prop/boolean_identities.rs
index 781cce8c7..2aa038034 100644
--- a/tests/mir-opt/const_prop/boolean_identities.rs
+++ b/tests/mir-opt/const_prop/boolean_identities.rs
@@ -1,10 +1,16 @@
-// skip-filecheck
// unit-test: ConstProp
-// compile-flags: -O -Zmir-opt-level=4
// EMIT_MIR boolean_identities.test.ConstProp.diff
pub fn test(x: bool, y: bool) -> bool {
- (y | true) & (x & false)
+ // CHECK-LABEL: fn test(
+ // CHECK: debug a => [[a:_.*]];
+ // CHECK: debug b => [[b:_.*]];
+ // CHECK: [[a]] = const true;
+ // CHECK: [[b]] = const false;
+ // CHECK: _0 = const false;
+ let a = (y | true);
+ let b = (x & false);
+ a & b
}
fn main() {