Skip to content

Commit f56cfac

Browse files
committed
!fixup restore comment and assert for onlyFirstLaneUsed
1 parent 67ff597 commit f56cfac

File tree

1 file changed

+3
-0
lines changed
  • llvm/lib/Transforms/Vectorize

1 file changed

+3
-0
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,7 +2231,10 @@ class VPReductionPHIRecipe : public VPHeaderPHIRecipe,
22312231
/// Returns true, if the phi is part of an in-loop reduction.
22322232
bool isInLoop() const { return IsInLoop; }
22332233

2234+
/// Returns true if the recipe only uses the first lane of operand \p Op.
22342235
bool onlyFirstLaneUsed(const VPValue *Op) const override {
2236+
assert(is_contained(operands(), Op) &&
2237+
"Op must be an operand of the recipe");
22352238
return isOrdered() || isInLoop();
22362239
}
22372240
};

0 commit comments

Comments
 (0)