[LV] Turn check for unexpected VF into assertion (NFC).
VF should always be non-zero in widenIntOrFpInduction. Turn check into assertion.
This commit is contained in:
		
							parent
							
								
									2edcde00cb
								
							
						
					
					
						commit
						e2f1c4c706
					
				| 
						 | 
					@ -2499,6 +2499,7 @@ void InnerLoopVectorizer::widenIntOrFpInduction(PHINode *IV,
 | 
				
			||||||
  assert((IV->getType()->isIntegerTy() || IV != OldInduction) &&
 | 
					  assert((IV->getType()->isIntegerTy() || IV != OldInduction) &&
 | 
				
			||||||
         "Primary induction variable must have an integer type");
 | 
					         "Primary induction variable must have an integer type");
 | 
				
			||||||
  assert(IV->getType() == ID.getStartValue()->getType() && "Types must match");
 | 
					  assert(IV->getType() == ID.getStartValue()->getType() && "Types must match");
 | 
				
			||||||
 | 
					  assert(!State.VF.isZero() && "VF must be non-zero");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // The value from the original loop to which we are mapping the new induction
 | 
					  // The value from the original loop to which we are mapping the new induction
 | 
				
			||||||
  // variable.
 | 
					  // variable.
 | 
				
			||||||
| 
						 | 
					@ -2573,7 +2574,7 @@ void InnerLoopVectorizer::widenIntOrFpInduction(PHINode *IV,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Now do the actual transformations, and start with creating the step value.
 | 
					  // Now do the actual transformations, and start with creating the step value.
 | 
				
			||||||
  Value *Step = CreateStepValue(ID.getStep());
 | 
					  Value *Step = CreateStepValue(ID.getStep());
 | 
				
			||||||
  if (State.VF.isZero() || State.VF.isScalar()) {
 | 
					  if (State.VF.isScalar()) {
 | 
				
			||||||
    Value *ScalarIV = CreateScalarIV(Step);
 | 
					    Value *ScalarIV = CreateScalarIV(Step);
 | 
				
			||||||
    CreateSplatIV(ScalarIV, Step);
 | 
					    CreateSplatIV(ScalarIV, Step);
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue