diff options
| author | CastilloDel <delcastillodelarosadaniel@gmail.com> | 2024-04-14 11:35:55 +0200 |
|---|---|---|
| committer | CastilloDel <delcastillodelarosadaniel@gmail.com> | 2024-04-14 11:35:55 +0200 |
| commit | 069209034dfdaf520dc14aa4f0bfab935da0032c (patch) | |
| tree | e2485227a854d8907362bbee91273a4bf386995d | |
| parent | 853311c35811ea8a05baf97aae895b017b83cc23 (diff) | |
| download | rust-069209034dfdaf520dc14aa4f0bfab935da0032c.tar.gz rust-069209034dfdaf520dc14aa4f0bfab935da0032c.zip | |
Run filecheck on dest-prop/dead_stores_79191.rs and dead_stores_better.rs
| -rw-r--r-- | tests/mir-opt/dest-prop/dead_stores_79191.rs | 8 | ||||
| -rw-r--r-- | tests/mir-opt/dest-prop/dead_stores_better.rs | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/tests/mir-opt/dest-prop/dead_stores_79191.rs b/tests/mir-opt/dest-prop/dead_stores_79191.rs index b3e370966d0..85411b17569 100644 --- a/tests/mir-opt/dest-prop/dead_stores_79191.rs +++ b/tests/mir-opt/dest-prop/dead_stores_79191.rs @@ -1,4 +1,3 @@ -// skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //@ unit-test: DestinationPropagation @@ -8,6 +7,13 @@ fn id<T>(x: T) -> T { // EMIT_MIR dead_stores_79191.f.DestinationPropagation.after.mir fn f(mut a: usize) -> usize { + // CHECK-LABEL: fn f( + // CHECK: debug a => [[a:_.*]]; + // CHECK: debug b => [[b:_.*]]; + // CHECK: [[b]] = [[a]]; + // CHECK: [[a]] = const 5_usize; + // CHECK: [[a]] = move [[b]]; + // CHECK: id::<usize>(move [[a]]) let b = a; a = 5; a = b; diff --git a/tests/mir-opt/dest-prop/dead_stores_better.rs b/tests/mir-opt/dest-prop/dead_stores_better.rs index c241d71594b..3d2af421bc2 100644 --- a/tests/mir-opt/dest-prop/dead_stores_better.rs +++ b/tests/mir-opt/dest-prop/dead_stores_better.rs @@ -1,4 +1,3 @@ -// skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates // that that pass enables this one to do more optimizations. @@ -12,6 +11,13 @@ fn id<T>(x: T) -> T { // EMIT_MIR dead_stores_better.f.DestinationPropagation.after.mir pub fn f(mut a: usize) -> usize { + // CHECK-LABEL: fn f( + // CHECK: debug a => [[a:_.*]]; + // CHECK: debug b => [[b:_.*]]; + // CHECK: [[b]] = [[a]]; + // CHECK: [[a]] = const 5_usize; + // CHECK: [[a]] = move [[b]]; + // CHECK: id::<usize>(move [[a]]) let b = a; a = 5; a = b; |
