Skip to content

Commit a25d63b

Browse files
committed
[LV] Fixup IV users only once during epilogue vectorization.
1 parent 8c3560a commit a25d63b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ class InnerLoopVectorizer {
545545
friend class LoopVectorizationPlanner;
546546

547547
/// Set up the values of the IVs correctly when exiting the vector loop.
548-
void fixupIVUsers(PHINode *OrigPhi, const InductionDescriptor &II,
548+
virtual void fixupIVUsers(PHINode *OrigPhi, const InductionDescriptor &II,
549549
Value *VectorTripCount, Value *EndValue,
550550
BasicBlock *MiddleBlock, VPlan &Plan,
551551
VPTransformState &State);
@@ -784,6 +784,11 @@ class EpilogueVectorizerMainLoop : public InnerLoopAndEpilogueVectorizer {
784784
BasicBlock *emitIterationCountCheck(BasicBlock *Bypass, bool ForEpilogue);
785785
void printDebugTracesAtStart() override;
786786
void printDebugTracesAtEnd() override;
787+
788+
void fixupIVUsers(PHINode *OrigPhi, const InductionDescriptor &II,
789+
Value *VectorTripCount, Value *EndValue,
790+
BasicBlock *MiddleBlock, VPlan &Plan,
791+
VPTransformState &State) override {};
787792
};
788793

789794
// A specialized derived class of inner loop vectorizer that performs

0 commit comments

Comments
 (0)