[SCCP] Merge two conditions into one. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275593 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Davide Italiano 2016-07-15 18:33:16 +00:00
parent b2d6ad7cfd
commit df5741e5fd

View File

@ -1489,9 +1489,7 @@ bool SCCPSolver::ResolvedUndefsIn(Function &F) {
}
if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) {
if (!SI->getNumCases())
continue;
if (!getValueState(SI->getCondition()).isUnknown())
if (!SI->getNumCases() || !getValueState(SI->getCondition()).isUnknown())
continue;
// If the input to SCCP is actually switch on undef, fix the undef to