[lld] [polly] [openmp] [llvm] [flang] [clang] [mlir] [compiler-rt] [lldb] [VPlan] Compute scalable VF in preheader for induction increment. (PR #74762)
Florian Hahn via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 8 02:59:33 PST 2023
================
@@ -340,8 +340,13 @@ 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<>::InsertPointGuard Guard(Builder);
+ Builder.SetInsertPoint(VectorPH->getTerminator());
----------------
fhahn wrote:
Adjusted in the latest version, thanks!
https://github.com/llvm/llvm-project/pull/74762
More information about the cfe-commits
mailing list