From 378abbc604897945cf86a9eb0c16371ebd571b54 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sat, 2 Dec 2023 20:16:25 +0000 Subject: [PATCH] FileCheck address_of_pair. --- tests/mir-opt/const_prop/address_of_pair.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/mir-opt/const_prop/address_of_pair.rs b/tests/mir-opt/const_prop/address_of_pair.rs index 169469a073917..730ebe2ca636b 100644 --- a/tests/mir-opt/const_prop/address_of_pair.rs +++ b/tests/mir-opt/const_prop/address_of_pair.rs @@ -1,8 +1,21 @@ -// skip-filecheck // unit-test: ConstProp // EMIT_MIR address_of_pair.fn0.ConstProp.diff pub fn fn0() -> bool { + // CHECK-LABEL: fn fn0( + // CHECK: debug pair => [[pair:_.*]]; + // CHECK: debug ptr => [[ptr:_.*]]; + // CHECK: debug ret => [[ret:_.*]]; + // CHECK: (*[[ptr]]) = const true; + // CHECK-NOT: = const false; + // CHECK-NOT: = const true; + // CHECK: [[tmp:_.*]] = ([[pair]].1: bool); + // CHECK-NOT: = const false; + // CHECK-NOT: = const true; + // CHECK: [[ret]] = Not(move [[tmp]]); + // CHECK-NOT: = const false; + // CHECK-NOT: = const true; + // CHECK: _0 = [[ret]]; let mut pair = (1, false); let ptr = core::ptr::addr_of_mut!(pair.1); pair = (1, false);