diff options
author | Fangrui Song <maskray@google.com> | 2019-07-12 14:58:15 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-07-12 14:58:15 +0000 |
commit | b251cc0d91362ea44f00a0138998a0272791f7dc (patch) | |
tree | fb2f4a2e59243cd19de79db04acf1e1e408e9661 /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | a196469e67ce578df4fc9f348cc5b7221f12b239 (diff) | |
download | bcm5719-llvm-b251cc0d91362ea44f00a0138998a0272791f7dc.tar.gz bcm5719-llvm-b251cc0d91362ea44f00a0138998a0272791f7dc.zip |
Delete dead stores
llvm-svn: 365903
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 95d6c20b692..d81886fca9d 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -10708,13 +10708,10 @@ ScalarEvolution::howManyGreaterThans(const SCEV *LHS, const SCEV *RHS, IsSigned ? APIntOps::smax(getSignedRangeMin(RHS), Limit) : APIntOps::umax(getUnsignedRangeMin(RHS), Limit); - - const SCEV *MaxBECount = getCouldNotCompute(); - if (isa<SCEVConstant>(BECount)) - MaxBECount = BECount; - else - MaxBECount = computeBECount(getConstant(MaxStart - MinEnd), - getConstant(MinStride), false); + const SCEV *MaxBECount = isa<SCEVConstant>(BECount) + ? BECount + : computeBECount(getConstant(MaxStart - MinEnd), + getConstant(MinStride), false); if (isa<SCEVCouldNotCompute>(MaxBECount)) MaxBECount = BECount; |