[llvm] r275307 - [SCCP] Use early return. NFCI.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 12:23:31 PDT 2016
Author: davide
Date: Wed Jul 13 14:23:30 2016
New Revision: 275307
URL: http://llvm.org/viewvc/llvm-project?rev=275307&view=rev
Log:
[SCCP] Use early return. 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=275307&r1=275306&r2=275307&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Wed Jul 13 14:23:30 2016
@@ -365,11 +365,11 @@ private:
if (IV.isOverdefined() || MergeWithV.isUnknown())
return; // Noop.
if (MergeWithV.isOverdefined())
- markOverdefined(IV, V);
- else if (IV.isUnknown())
- markConstant(IV, V, MergeWithV.getConstant());
- else if (IV.getConstant() != MergeWithV.getConstant())
- markOverdefined(IV, V);
+ return markOverdefined(IV, V);
+ if (IV.isUnknown())
+ return markConstant(IV, V, MergeWithV.getConstant());
+ if (IV.getConstant() != MergeWithV.getConstant())
+ return markOverdefined(IV, V);
}
void mergeInValue(Value *V, LatticeVal MergeWithV) {
More information about the llvm-commits
mailing list