From d91bb5074e4f926bb9c2b2b43237bcf8d3c512b6 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sat, 2 Dec 2023 20:50:00 +0000 Subject: [PATCH] FileCheck mutable_variable_no_prop. --- tests/mir-opt/const_prop/mutable_variable_no_prop.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs index a7aeeccd8611c..49e9a701581b3 100644 --- a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs +++ b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs @@ -1,10 +1,17 @@ -// skip-filecheck // unit-test: ConstProp +// Verify that we do not propagate the contents of this mutable static. static mut STATIC: u32 = 0x42424242; // EMIT_MIR mutable_variable_no_prop.main.ConstProp.diff fn main() { + // CHECK-LABEL: fn main( + // CHECK: debug x => [[x:_.*]]; + // CHECK: debug y => [[y:_.*]]; + // CHECK: [[x]] = const 42_u32; + // CHECK: [[tmp:_.*]] = (*{{_.*}}); + // CHECK: [[x]] = move [[tmp]]; + // CHECK: [[y]] = [[x]]; let mut x = 42; unsafe { x = STATIC;