[llvm] r275593 - [SCCP] Merge two conditions into one. NFCI.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 11:33:16 PDT 2016
Author: davide
Date: Fri Jul 15 13:33:16 2016
New Revision: 275593
URL: http://llvm.org/viewvc/llvm-project?rev=275593&view=rev
Log:
[SCCP] Merge two conditions into one. NFCI.
Modified:
llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=275593&r1=275592&r2=275593&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Fri Jul 15 13:33:16 2016
@@ -1489,9 +1489,7 @@ bool SCCPSolver::ResolvedUndefsIn(Functi
}
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
More information about the llvm-commits
mailing list