From 4e28753140768843d5457c3fd624d9812bdce1d3 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Mon, 16 Nov 2015 22:16:52 +0000 Subject: use range-based for loop; NFCI llvm-svn: 253256 --- llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/InstCombine') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index 35d1e336476..0da0ea4ba14 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/llvm/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; -- cgit v1.2.3