[llvm] r300567 - [X86] Use for-range loop. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 18 10:18:55 PDT 2017
Author: rksimon
Date: Tue Apr 18 12:18:54 2017
New Revision: 300567
URL: http://llvm.org/viewvc/llvm-project?rev=300567&view=rev
Log:
[X86] Use for-range loop. NFCI.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=300567&r1=300566&r2=300567&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Apr 18 12:18:54 2017
@@ -32234,8 +32234,8 @@ static SDValue detectAVGPattern(SDValue
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();
More information about the llvm-commits
mailing list