[X86] Use for-range loop. NFCI.

llvm-svn: 300567
This commit is contained in:
Simon Pilgrim 2017-04-18 17:18:54 +00:00
parent fc947bcfba
commit e8ad1da4e2
1 changed files with 2 additions and 2 deletions

View File

@ -32234,8 +32234,8 @@ static SDValue detectAVGPattern(SDValue In, EVT VT, SelectionDAG &DAG,
BuildVectorSDNode *BV = dyn_cast<BuildVectorSDNode>(V);
if (!BV || !BV->isConstant())
return false;
for (unsigned i = 0, e = V.getNumOperands(); i < e; i++) {
ConstantSDNode *C = dyn_cast<ConstantSDNode>(V.getOperand(i));
for (SDValue Op : V->ops()) {
ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op);
if (!C)
return false;
uint64_t Val = C->getZExtValue();