Commit 0692090 1 parent 853311c commit 0692090 Copy full SHA for 0692090
File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
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: DestinationPropagation
4
3
@@ -8,6 +7,13 @@ fn id<T>(x: T) -> T {
8
7
9
8
// EMIT_MIR dead_stores_79191.f.DestinationPropagation.after.mir
10
9
fn f ( mut a : usize ) -> usize {
10
+ // CHECK-LABEL: fn f(
11
+ // CHECK: debug a => [[a:_.*]];
12
+ // CHECK: debug b => [[b:_.*]];
13
+ // CHECK: [[b]] = [[a]];
14
+ // CHECK: [[a]] = const 5_usize;
15
+ // CHECK: [[a]] = move [[b]];
16
+ // CHECK: id::<usize>(move [[a]])
11
17
let b = a;
12
18
a = 5 ;
13
19
a = b;
Original file line number Diff line number Diff line change 1
- // skip-filecheck
2
1
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
3
2
// This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates
4
3
// that that pass enables this one to do more optimizations.
@@ -12,6 +11,13 @@ fn id<T>(x: T) -> T {
12
11
13
12
// EMIT_MIR dead_stores_better.f.DestinationPropagation.after.mir
14
13
pub fn f ( mut a : usize ) -> usize {
14
+ // CHECK-LABEL: fn f(
15
+ // CHECK: debug a => [[a:_.*]];
16
+ // CHECK: debug b => [[b:_.*]];
17
+ // CHECK: [[b]] = [[a]];
18
+ // CHECK: [[a]] = const 5_usize;
19
+ // CHECK: [[a]] = move [[b]];
20
+ // CHECK: id::<usize>(move [[a]])
15
21
let b = a;
16
22
a = 5 ;
17
23
a = b;
You can’t perform that action at this time.
0 commit comments