File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -154,22 +154,27 @@ bool VPlanVerifier::verifyEVLRecipe(const VPInstruction &EVL) const {
154154 .Case <VPScalarCastRecipe>(
155155 [&](const VPScalarCastRecipe *S) { return true ; })
156156 .Case <VPInstruction>([&](const VPInstruction *I) {
157- if (I->getOpcode () != Instruction::Add) {
157+ switch (I->getOpcode ()) {
158+ default :
158159 errs ()
159- << " EVL is used as an operand in non-VPInstruction::Add\n " ;
160+ << " EVL is used in VPInstructions that are neither "
161+ " Instruction::Add nor VPInstruction::MergeUntilPivot\n " ;
160162 return false ;
163+ case Instruction::Add:
164+ if (I->getNumUsers () != 1 ) {
165+ errs () << " EVL is used in VPInstruction:Add with multiple "
166+ " users\n " ;
167+ return false ;
168+ }
169+ if (!isa<VPEVLBasedIVPHIRecipe>(*I->users ().begin ())) {
170+ errs () << " Result of VPInstruction::Add with EVL operand is "
171+ " not used by VPEVLBasedIVPHIRecipe\n " ;
172+ return false ;
173+ }
174+ return true ;
175+ case VPInstruction::MergeUntilPivot:
176+ return VerifyEVLUse (*I, 3 );
161177 }
162- if (I->getNumUsers () != 1 ) {
163- errs () << " EVL is used in VPInstruction:Add with multiple "
164- " users\n " ;
165- return false ;
166- }
167- if (!isa<VPEVLBasedIVPHIRecipe>(*I->users ().begin ())) {
168- errs () << " Result of VPInstruction::Add with EVL operand is "
169- " not used by VPEVLBasedIVPHIRecipe\n " ;
170- return false ;
171- }
172- return true ;
173178 })
174179 .Default ([&](const VPUser *U) {
175180 errs () << " EVL has unexpected user\n " ;
You can’t perform that action at this time.
0 commit comments