Skip to content

Commit 378abbc

Browse files
committed
FileCheck address_of_pair.
1 parent 0908f17 commit 378abbc

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests/mir-opt/const_prop/address_of_pair.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
// skip-filecheck
21
// unit-test: ConstProp
32

43
// EMIT_MIR address_of_pair.fn0.ConstProp.diff
54
pub fn fn0() -> bool {
5+
// CHECK-LABEL: fn fn0(
6+
// CHECK: debug pair => [[pair:_.*]];
7+
// CHECK: debug ptr => [[ptr:_.*]];
8+
// CHECK: debug ret => [[ret:_.*]];
9+
// CHECK: (*[[ptr]]) = const true;
10+
// CHECK-NOT: = const false;
11+
// CHECK-NOT: = const true;
12+
// CHECK: [[tmp:_.*]] = ([[pair]].1: bool);
13+
// CHECK-NOT: = const false;
14+
// CHECK-NOT: = const true;
15+
// CHECK: [[ret]] = Not(move [[tmp]]);
16+
// CHECK-NOT: = const false;
17+
// CHECK-NOT: = const true;
18+
// CHECK: _0 = [[ret]];
619
let mut pair = (1, false);
720
let ptr = core::ptr::addr_of_mut!(pair.1);
821
pair = (1, false);

0 commit comments

Comments
 (0)