From eaf6bc683e2617c6b53256495771828cd0b6ff0d Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Mon, 16 Nov 2015 22:16:52 +0000 Subject: [PATCH] use range-based for loop; NFCI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253256 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.34.1