aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index b1c3a17..bf67fd3 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -1210,8 +1210,8 @@ void ScalarEvolutionsImpl::deleteInstructionFromRecords(Instruction *I) {
for (Instruction::use_iterator UI = II->use_begin(), UE = II->use_end();
UI != UE; ++UI) {
- Instruction *Inst = dyn_cast<Instruction>(*UI);
- if (Inst && hasSCEV(Inst) && Scalars.erase(Inst)) {
+ Instruction *Inst = cast<Instruction>(*UI);
+ if (Scalars.erase(Inst)) {
if (PHINode *PN = dyn_cast<PHINode>(II))
ConstantEvolutionLoopExitValue.erase(PN);
Worklist.push_back(Inst);