From: Sanjay Patel Date: Mon, 16 Nov 2015 22:16:52 +0000 (+0000) Subject: use range-based for loop; NFCI X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=eaf6bc683e2617c6b53256495771828cd0b6ff0d;p=oota-llvm.git use range-based for loop; NFCI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253256 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index 35d1e336476..0da0ea4ba14 100644 --- a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp @@ -586,8 +586,8 @@ static bool CanEvaluateShuffled(Value *V, ArrayRef Mask, 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;