[llvm] r355257 - [SCEV] Remove undef check for SCEVConstant (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 1 17:57:29 PST 2019
Author: fhahn
Date: Fri Mar 1 17:57:28 2019
New Revision: 355257
URL: http://llvm.org/viewvc/llvm-project?rev=355257&view=rev
Log:
[SCEV] Remove undef check for SCEVConstant (NFC)
The value stored in SCEVConstant is of type ConstantInt*, which can
never be UndefValue. So we should never hit that code.
Reviewers: mkazantsev, sanjoy
Reviewed By: sanjoy
Differential Revision: https://reviews.llvm.org/D58851
Modified:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=355257&r1=355256&r2=355257&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Fri Mar 1 17:57:28 2019
@@ -10824,8 +10824,6 @@ static inline bool containsUndefs(const
return SCEVExprContains(S, [](const SCEV *S) {
if (const auto *SU = dyn_cast<SCEVUnknown>(S))
return isa<UndefValue>(SU->getValue());
- else if (const auto *SC = dyn_cast<SCEVConstant>(S))
- return isa<UndefValue>(SC->getValue());
return false;
});
}
More information about the llvm-commits
mailing list