File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
tests/mir-opt/dataflow-const-prop Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
- // skip-filecheck
2
1
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
3
2
// unit-test: DataflowConstProp
4
3
// compile-flags: -Zmir-enable-passes=+InstSimplify
5
4
// EMIT_MIR_FOR_EACH_BIT_WIDTH
6
5
7
6
// EMIT_MIR slice_len.main.DataflowConstProp.diff
7
+
8
+ // CHECK-LABEL: fn main
8
9
fn main ( ) {
10
+ // CHECK: debug local => [[local:_[0-9]+]];
11
+ // CHECK: debug constant => [[constant:_[0-9]+]];
12
+
13
+ // CHECK: {{_[0-9]+}} = const 3_usize;
14
+ // CHECK: {{_[0-9]+}} = const true;
15
+
16
+ // CHECK: [[local]] = (*{{_[0-9]+}})[1 of 2];
9
17
let local = ( & [ 1u32 , 2 , 3 ] as & [ u32 ] ) [ 1 ] ;
10
18
11
19
const SLICE : & [ u32 ] = & [ 1 , 2 , 3 ] ;
20
+
21
+ // CHECK: [[constant]] = (*{{_[0-9]+}})[1 of 2];
12
22
let constant = SLICE [ 1 ] ;
13
23
}
You can’t perform that action at this time.
0 commit comments