]> granicus.if.org Git - llvm/commitdiff
[SCEV] Remove undef check for SCEVConstant (NFC)
authorFlorian Hahn <flo@fhahn.com>
Sat, 2 Mar 2019 01:57:28 +0000 (01:57 +0000)
committerFlorian Hahn <flo@fhahn.com>
Sat, 2 Mar 2019 01:57:28 +0000 (01:57 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355257 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index cca425bf550e18fdfaa7daa819b5b7c917eebe18..290e87a1f0fb9df78f17db610e2249e65ad34ee3 100644 (file)
@@ -10824,8 +10824,6 @@ static inline bool containsUndefs(const SCEV *S) {
   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;
   });
 }