use range-based for loop; NFCI
authorSanjay Patel <spatel@rotateright.com>
Mon, 16 Nov 2015 22:16:52 +0000 (22:16 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 16 Nov 2015 22:16:52 +0000 (22:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253256 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineVectorOps.cpp

index 35d1e336476ef433914713be2f070bba118d8478..0da0ea4ba144a2381c8a18d7e92ceb134844adde 100644 (file)
@@ -586,8 +586,8 @@ static bool CanEvaluateShuffled(Value *V, ArrayRef<int> 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;