diff options
| author | bors <bors@rust-lang.org> | 2023-06-01 10:47:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-06-01 10:47:14 +0000 |
| commit | 642c92e63008ffb49f6ad8344e07bfa7d5b0d9bb (patch) | |
| tree | bac188f5c26577fa24de57e75b377756ad4b6a36 /tests/codegen | |
| parent | fabf9298633ca64450fa2af535252dc44a3b1080 (diff) | |
| parent | 79ba7b307d0d0120a95043d229f5420858981045 (diff) | |
| download | rust-642c92e63008ffb49f6ad8344e07bfa7d5b0d9bb.tar.gz rust-642c92e63008ffb49f6ad8344e07bfa7d5b0d9bb.zip | |
Auto merge of #112002 - saethlin:enable-sroa, r=oli-obk,scottmcm
Enable ScalarReplacementOfAggregates in optimized builds Like MatchBranchSimplification, this pass is known to produce significant runtime improvements in Cranelift artifacts, and I believe based on the perf runs here that the primary effect of this pass is to empower MatchBranchSimplification. ScalarReplacementOfAggregates on its own has little effect on anything, but when this was rebased up to include https://github.com/rust-lang/rust/pull/112001 we started seeing significant and majority-positive results. Based on the fact that we see most of the regressions in debug builds (https://github.com/rust-lang/rust/pull/112002#issuecomment-1566270144) and some rather significant ones in cycles and wall time, I'm only enabling this in optimized builds at the moment.
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/issues/issue-105386-ub-in-debuginfo.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs index 2ee4d7cca0e..6e0eacfe400 100644 --- a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs +++ b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs @@ -1,4 +1,5 @@ -// compile-flags: --crate-type=lib -O -Cdebuginfo=2 -Cno-prepopulate-passes +// compile-flags: --crate-type=lib -O -Cdebuginfo=2 -Cno-prepopulate-passes -Zmir-enable-passes=-ScalarReplacementOfAggregates +// MIR SROA will decompose the closure // min-llvm-version: 15.0 # this test uses opaque pointer notation #![feature(stmt_expr_attributes)] @@ -15,8 +16,8 @@ pub fn outer_function(x: S, y: S) -> usize { // Check that we do not attempt to load from the spilled arg before it is assigned to // when generating debuginfo. // CHECK-LABEL: @outer_function -// CHECK: [[spill:%.*]] = alloca %"[closure@{{.*.rs}}:9:23: 9:25]" -// CHECK-NOT: [[ptr_tmp:%.*]] = getelementptr inbounds %"[closure@{{.*.rs}}:9:23: 9:25]", ptr [[spill]] +// CHECK: [[spill:%.*]] = alloca %"[closure@{{.*.rs}}:10:23: 10:25]" +// CHECK-NOT: [[ptr_tmp:%.*]] = getelementptr inbounds %"[closure@{{.*.rs}}:10:23: 10:25]", ptr [[spill]] // CHECK-NOT: [[load:%.*]] = load ptr, ptr // CHECK: call void @llvm.lifetime.start{{.*}}({{.*}}, ptr [[spill]]) // CHECK: [[inner:%.*]] = getelementptr inbounds %"{{.*}}", ptr [[spill]] |
