[Lldb-commits] [lldb] [clang] [openmp] [polly] [flang] [mlir] [compiler-rt] [llvm] [lld] [VPlan] Compute scalable VF in preheader for induction increment. (PR #74762)
Florian Hahn via lldb-commits
lldb-commits at lists.llvm.org
Sat Dec 9 05:06:39 PST 2023
================
@@ -340,8 +340,14 @@ Value *VPInstruction::generateInstruction(VPTransformState &State,
auto *Phi = State.get(getOperand(0), 0);
// The loop step is equal to the vectorization factor (num of SIMD
// elements) times the unroll factor (num of SIMD instructions).
- Value *Step =
- createStepForVF(Builder, Phi->getType(), State.VF, State.UF);
+ Value *Step;
+ {
+ BasicBlock *VectorPH = State.CFG.getPreheaderBBFor(this);
+ IRBuilder<> PHBuilder(VectorPH->getTerminator());
+ // Step is loop-invariant, calls to vscale will be placed in the
+ // preheader.
+ Step = createStepForVF(PHBuilder, Phi->getType(), State.VF, State.UF);
+ }
----------------
fhahn wrote:
The cow has been remove in https://github.com/llvm/llvm-project/commit/a5891fa4d2b76cf9dec96da9ded59fc4937d3342
https://github.com/llvm/llvm-project/pull/74762
More information about the lldb-commits
mailing list