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 @@ -158,22 +158,27 @@ bool VPlanVerifier::verifyEVLRecipe(const VPInstruction &EVL) const {
158158             .Case <VPScalarCastRecipe>(
159159                 [&](const  VPScalarCastRecipe *S) { return  true ; })
160160             .Case <VPInstruction>([&](const  VPInstruction *I) {
161-                if  (I->getOpcode () != Instruction::Add) {
161+                switch  (I->getOpcode ()) {
162+                default :
162163                 errs ()
163-                      << " EVL is used as an operand in non-VPInstruction::Add\n " 
164+                      << " EVL is used in VPInstructions that are neither " 
165+                         " Instruction::Add nor VPInstruction::MergeUntilPivot\n " 
164166                 return  false ;
167+                case  Instruction::Add:
168+                  if  (I->getNumUsers () != 1 ) {
169+                    errs () << " EVL is used in VPInstruction:Add with multiple " 
170+                              " users\n " 
171+                    return  false ;
172+                  }
173+                  if  (!isa<VPEVLBasedIVPHIRecipe>(*I->users ().begin ())) {
174+                    errs () << " Result of VPInstruction::Add with EVL operand is " 
175+                              " not used by VPEVLBasedIVPHIRecipe\n " 
176+                    return  false ;
177+                  }
178+                  return  true ;
179+                case  VPInstruction::MergeUntilPivot:
180+                  return  VerifyEVLUse (*I, 3 );
165181               }
166-                if  (I->getNumUsers () != 1 ) {
167-                  errs () << " EVL is used in VPInstruction:Add with multiple " 
168-                            " users\n " 
169-                  return  false ;
170-                }
171-                if  (!isa<VPEVLBasedIVPHIRecipe>(*I->users ().begin ())) {
172-                  errs () << " Result of VPInstruction::Add with EVL operand is " 
173-                            " not used by VPEVLBasedIVPHIRecipe\n " 
174-                  return  false ;
175-                }
176-                return  true ;
177182             })
178183             .Default ([&](const  VPUser *U) {
179184               errs () << " EVL has unexpected user\n " 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments