Skip to content

Commit f1ba44f

Browse files
authored
[VPlan] Strip dead code in cst live-in match (NFC) (#159589)
A live-in constant can never be of vector type.
1 parent d2ba0da commit f1ba44f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,8 @@ template <typename Pred, unsigned BitWidth = 0> struct int_pred_ty {
108108
Value *V = VPV->getLiveInIRValue();
109109
if (!V)
110110
return false;
111+
assert(!V->getType()->isVectorTy() && "Unexpected vector live-in");
111112
const auto *CI = dyn_cast<ConstantInt>(V);
112-
if (!CI && V->getType()->isVectorTy())
113-
if (const auto *C = dyn_cast<Constant>(V))
114-
CI = dyn_cast_or_null<ConstantInt>(
115-
C->getSplatValue(/*AllowPoison=*/false));
116113
if (!CI)
117114
return false;
118115

0 commit comments

Comments
 (0)