aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 600a061..3612067 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -4221,8 +4221,7 @@ bool ScalarEvolution::canReuseInstruction(
if (I->hasPoisonGeneratingAnnotations())
DropPoisonGeneratingInsts.push_back(I);
- for (Value *Op : I->operands())
- Worklist.push_back(Op);
+ llvm::append_range(Worklist, I->operands());
}
return true;
}
@@ -7622,8 +7621,7 @@ ScalarEvolution::getOperandsToCreate(Value *V, SmallVectorImpl<Value *> &Ops) {
case Instruction::GetElementPtr:
assert(cast<GEPOperator>(U)->getSourceElementType()->isSized() &&
"GEP source element type must be sized");
- for (Value *Index : U->operands())
- Ops.push_back(Index);
+ llvm::append_range(Ops, U->operands());
return nullptr;
case Instruction::IntToPtr:
@@ -7656,8 +7654,7 @@ ScalarEvolution::getOperandsToCreate(Value *V, SmallVectorImpl<Value *> &Ops) {
if (CanSimplifyToUnknown())
return getUnknown(U);
- for (Value *Inc : U->operands())
- Ops.push_back(Inc);
+ llvm::append_range(Ops, U->operands());
return nullptr;
break;
}