Skip to content

Commit aa9784d

Browse files
committed
[LV] add assert, addressing review
1 parent 8f59750 commit aa9784d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,9 @@ void LoopVectorizationLegality::addInductionPhi(
693693
Type *PhiTy = Phi->getType();
694694
const DataLayout &DL = Phi->getDataLayout();
695695

696+
assert((PhiTy->isIntOrPtrTy() || PhiTy->isFloatingPointTy()) &&
697+
"Expected int, ptr, or FP induction phi type");
698+
696699
// Get the widest type.
697700
if (PhiTy->isIntOrPtrTy()) {
698701
if (!WidestIndTy)

0 commit comments

Comments
 (0)