diff options
| author | bors <bors@rust-lang.org> | 2020-10-26 23:22:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-26 23:22:39 +0000 |
| commit | a4d30a7b490065f0aa56f58e508a11546445aea9 (patch) | |
| tree | bbdc3de20631e3de526db464604dc767a99b30fe /src/test/codegen | |
| parent | fd542592f08ca0d1f7255600115c2eafdf6b5da7 (diff) | |
| parent | 4c3e06a0ba557c5915d8c00f23455461549f07f6 (diff) | |
| download | rust-a4d30a7b490065f0aa56f58e508a11546445aea9.tar.gz rust-a4d30a7b490065f0aa56f58e508a11546445aea9.zip | |
Auto merge of #77876 - tmiasko:simplify-locals, r=wesleywiser
Remove unused set-discriminant statements and assignments regardless of rvalue * Represent use counts with u32 * Unify use count visitors * Change RemoveStatements visitor into a function * Remove unused set-discriminant statements * Use exhaustive match to clarify what is being optimized * Remove unused assignments regardless of rvalue kind
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/lifetime_start_end.rs | 6 | ||||
| -rw-r--r-- | src/test/codegen/loads.rs | 2 | ||||
| -rw-r--r-- | src/test/codegen/naked-functions.rs | 2 | ||||
| -rw-r--r-- | src/test/codegen/refs.rs | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/test/codegen/lifetime_start_end.rs b/src/test/codegen/lifetime_start_end.rs index 9df46bb3dd1..da35789ce8d 100644 --- a/src/test/codegen/lifetime_start_end.rs +++ b/src/test/codegen/lifetime_start_end.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C no-prepopulate-passes +// compile-flags: -O -C no-prepopulate-passes -Zmir-opt-level=0 #![crate_type = "lib"] @@ -18,10 +18,10 @@ pub fn test() { // CHECK: [[S_b:%[0-9]+]] = bitcast { i32, i32 }** %b to i8* // CHECK: call void @llvm.lifetime.start{{.*}}(i{{[0-9 ]+}}, i8* [[S_b]]) -// CHECK: [[S__4:%[0-9]+]] = bitcast { i32, i32 }* %_4 to i8* +// CHECK: [[S__4:%[0-9]+]] = bitcast { i32, i32 }* %_5 to i8* // CHECK: call void @llvm.lifetime.start{{.*}}(i{{[0-9 ]+}}, i8* [[S__4]]) -// CHECK: [[E__4:%[0-9]+]] = bitcast { i32, i32 }* %_4 to i8* +// CHECK: [[E__4:%[0-9]+]] = bitcast { i32, i32 }* %_5 to i8* // CHECK: call void @llvm.lifetime.end{{.*}}(i{{[0-9 ]+}}, i8* [[E__4]]) // CHECK: [[E_b:%[0-9]+]] = bitcast { i32, i32 }** %b to i8* diff --git a/src/test/codegen/loads.rs b/src/test/codegen/loads.rs index e164f5115ff..3c9ecec2cbf 100644 --- a/src/test/codegen/loads.rs +++ b/src/test/codegen/loads.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +// compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0 #![crate_type = "lib"] diff --git a/src/test/codegen/naked-functions.rs b/src/test/codegen/naked-functions.rs index 493c1b9f0ba..5e76f1d67e6 100644 --- a/src/test/codegen/naked-functions.rs +++ b/src/test/codegen/naked-functions.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +// compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0 #![crate_type = "lib"] #![feature(naked_functions)] diff --git a/src/test/codegen/refs.rs b/src/test/codegen/refs.rs index 15f99fd0c22..b4cc26f3f9d 100644 --- a/src/test/codegen/refs.rs +++ b/src/test/codegen/refs.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +// compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0 #![crate_type = "lib"] |
