From: Florian Hahn Date: Sat, 2 Mar 2019 01:57:28 +0000 (+0000) Subject: [SCEV] Remove undef check for SCEVConstant (NFC) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d56d7c48aabe04ce5a25b5cd64abdbe41a0befb3;p=llvm [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355257 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index cca425bf550..290e87a1f0f 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -10824,8 +10824,6 @@ static inline bool containsUndefs(const SCEV *S) { return SCEVExprContains(S, [](const SCEV *S) { if (const auto *SU = dyn_cast(S)) return isa(SU->getValue()); - else if (const auto *SC = dyn_cast(S)) - return isa(SC->getValue()); return false; }); }