Skip to content

Commit 183e8ec

Browse files
fhahntru
authored andcommitted
[LV] Disable VPlan-based cost model for 19.x release.
As discussed in #92555 flip the default for the option added in #99536 to true. This restores the original behavior for the release branch to give the VPlan-based cost model more time to mature on main.
1 parent fc9f6b0 commit 183e8ec

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static cl::opt<unsigned> VectorizeMemoryCheckThreshold(
206206
cl::desc("The maximum allowed number of runtime memory checks"));
207207

208208
static cl::opt<bool> UseLegacyCostModel(
209-
"vectorize-use-legacy-cost-model", cl::init(false), cl::Hidden,
209+
"vectorize-use-legacy-cost-model", cl::init(true), cl::Hidden,
210210
cl::desc("Use the legacy cost model instead of the VPlan-based cost model. "
211211
"This option will be removed in the future."));
212212

llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ define void @vector_reverse_i64(ptr nocapture noundef writeonly %A, ptr nocaptur
135135
; CHECK-NEXT: LV: Interleaving is not beneficial.
136136
; CHECK-NEXT: LV: Found a vectorizable loop (vscale x 4) in <stdin>
137137
; CHECK-NEXT: LEV: Epilogue vectorization is not profitable for this loop
138-
; CHECK-NEXT: VF picked by VPlan cost model: vscale x 4
139138
; CHECK-NEXT: Executing best plan with VF=vscale x 4, UF=1
140139
; CHECK-NEXT: VPlan 'Final VPlan for VF={vscale x 4},UF>=1' {
141140
; CHECK-NEXT: Live-in vp<%0> = VF * UF
@@ -339,7 +338,6 @@ define void @vector_reverse_f32(ptr nocapture noundef writeonly %A, ptr nocaptur
339338
; CHECK-NEXT: LV: Interleaving is not beneficial.
340339
; CHECK-NEXT: LV: Found a vectorizable loop (vscale x 4) in <stdin>
341340
; CHECK-NEXT: LEV: Epilogue vectorization is not profitable for this loop
342-
; CHECK-NEXT: VF picked by VPlan cost model: vscale x 4
343341
; CHECK-NEXT: Executing best plan with VF=vscale x 4, UF=1
344342
; CHECK-NEXT: VPlan 'Final VPlan for VF={vscale x 4},UF>=1' {
345343
; CHECK-NEXT: Live-in vp<%0> = VF * UF

llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/x86-loopvectorize-costmodel.ll.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ define void @test() {
1717
; CHECK: LV: Found an estimated cost of 5 for VF 16 For instruction: %v0 = load float, ptr %in0, align 4
1818
; CHECK: LV: Found an estimated cost of 22 for VF 32 For instruction: %v0 = load float, ptr %in0, align 4
1919
; CHECK: LV: Found an estimated cost of 92 for VF 64 For instruction: %v0 = load float, ptr %in0, align 4
20-
; CHECK: LV: Found an estimated cost of 1 for VF 1 For instruction: %v0 = load float, ptr %in0, align 4
2120
;
2221
entry:
2322
br label %for.body

0 commit comments

Comments
 (0)