diff options
author | Philip Reames <listmail@philipreames.com> | 2020-11-24 18:45:37 -0800 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2020-11-24 18:47:49 -0800 |
commit | 10ddb927c1c3ee6af0436c23f93fe1da6de7b99a (patch) | |
tree | c30bb706f535956a3305eab545741ed4cb4d961a /llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | |
parent | 3d1149c6fe48cdab768b587e5531c31b6f42ee12 (diff) | |
download | llvm-10ddb927c1c3ee6af0436c23f93fe1da6de7b99a.zip llvm-10ddb927c1c3ee6af0436c23f93fe1da6de7b99a.tar.gz llvm-10ddb927c1c3ee6af0436c23f93fe1da6de7b99a.tar.bz2 |
[SCEV] Use isa<> pattern for testing for CouldNotCompute [NFC]
Some older code - and code copied from older code - still directly tested against the singelton result of SE::getCouldNotCompute. Using the isa<SCEVCouldNotCompute> form is both shorter, and more readable.
Diffstat (limited to 'llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp index 877495b..c7e37fe 100644 --- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp @@ -2468,7 +2468,7 @@ Value *SCEVExpander::generateOverflowCheck(const SCEVAddRecExpr *AR, const SCEV *ExitCount = SE.getPredicatedBackedgeTakenCount(AR->getLoop(), Pred); - assert(ExitCount != SE.getCouldNotCompute() && "Invalid loop count"); + assert(!isa<SCEVCouldNotCompute>(ExitCount) && "Invalid loop count"); const SCEV *Step = AR->getStepRecurrence(SE); const SCEV *Start = AR->getStart(); |