[llvm] r253256 - use range-based for loop; NFCI
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 14:16:52 PST 2015
Author: spatel
Date: Mon Nov 16 16:16:52 2015
New Revision: 253256
URL: http://llvm.org/viewvc/llvm-project?rev=253256&view=rev
Log:
use range-based for loop; NFCI
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp?rev=253256&r1=253255&r2=253256&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp Mon Nov 16 16:16:52 2015
@@ -586,8 +586,8 @@ static bool CanEvaluateShuffled(Value *V
case Instruction::FPTrunc:
case Instruction::FPExt:
case Instruction::GetElementPtr: {
- for (int i = 0, e = I->getNumOperands(); i != e; ++i) {
- if (!CanEvaluateShuffled(I->getOperand(i), Mask, Depth-1))
+ for (Value *Operand : I->operands()) {
+ if (!CanEvaluateShuffled(Operand, Mask, Depth-1))
return false;
}
return true;
More information about the llvm-commits
mailing list