File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,8 @@ bool VPlanVerifier::verifyEVLRecipe(const VPInstruction &EVL) const {
166166 if (all_of (VEPRs, [&EVL](VPUser *U) {
167167 auto *VEPR = cast<VPVectorEndPointerRecipe>(U);
168168 return match (VEPR->getOffset (),
169- m_c_Mul (m_VPValue (), m_Sub (m_Specific (&EVL), m_One ())));
169+ m_c_Mul (m_SpecificSInt (VEPR->getStride ()),
170+ m_Sub (m_Specific (&EVL), m_One ())));
170171 }))
171172 return true ;
172173 errs () << " Expected VectorEndPointer with EVL operand\n " ;
@@ -196,6 +197,10 @@ bool VPlanVerifier::verifyEVLRecipe(const VPInstruction &EVL) const {
196197 I->getOpcode () == Instruction::ICmp)
197198 return VerifyEVLUse (*I, 1 );
198199 if (I->getOpcode () == Instruction::Sub) {
200+ // If Sub has a single user that's a SingleDefRecipe (which is
201+ // exepcted to be a Mul), filter its users, in turn, to get
202+ // VectorEndPointerRecipes, and verify that all the offsets match
203+ // (EVL - 1) * Stride.
199204 auto *VPI =
200205 dyn_cast_if_present<VPSingleDefRecipe>(I->getSingleUser ());
201206 if (VPI) {
You can’t perform that action at this time.
0 commit comments