Skip to content

Commit 54981bf

Browse files
committed
!fixup address latest comments, thanks!
1 parent 46780ab commit 54981bf

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2883,7 +2883,7 @@ void InnerLoopVectorizer::fixNonInductionPHIs(VPTransformState &State) {
28832883
PHINode *NewPhi = cast<PHINode>(State.get(VPPhi));
28842884
// Make sure the builder has a valid insert point.
28852885
Builder.SetInsertPoint(NewPhi);
2886-
for (unsigned Idx = 0; Idx < VPPhi->getNumIncomingValues(); ++Idx) {
2886+
for (unsigned Idx = 0; Idx < VPPhi->getNumIncoming(); ++Idx) {
28872887
VPValue *Inc = VPPhi->getIncomingValue(Idx);
28882888
const VPBasicBlock *VPBB = VPPhi->getIncomingBlock(Idx);
28892889
NewPhi->addIncoming(State.get(Inc), State.CFG.VPBB2IRBB[VPBB]);

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,9 +1184,8 @@ class VPPhiAccessors {
11841184
/// Returns the incoming block with index \p Idx.
11851185
const VPBasicBlock *getIncomingBlock(unsigned Idx) const;
11861186

1187-
unsigned getNumIncomingValues() const {
1188-
return getAsRecipe()->getNumOperands();
1189-
}
1187+
/// Returns the number of incoming values, also number of incoming blocks.
1188+
unsigned getNumIncoming() const { return getAsRecipe()->getNumOperands(); }
11901189
};
11911190

11921191
/// An overlay for VPIRInstructions wrapping PHI nodes enabling convenient use

0 commit comments

Comments
 (0)