summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2015-11-16 22:16:52 +0000
committerSanjay Patel <spatel@rotateright.com>2015-11-16 22:16:52 +0000
commit4e28753140768843d5457c3fd624d9812bdce1d3 (patch)
treeaff8e636899e45c5a654ad2a83c435f20942f6a1 /llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
parent0204e342ca3cfd846cb86ebe7562619a9ff024ca (diff)
downloadbcm5719-llvm-4e28753140768843d5457c3fd624d9812bdce1d3.tar.gz
bcm5719-llvm-4e28753140768843d5457c3fd624d9812bdce1d3.zip
use range-based for loop; NFCI
llvm-svn: 253256
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp4
1 files changed, 2 insertions, 2 deletions
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<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;
OpenPOWER on IntegriCloud