summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SCCP.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-05-10 19:49:47 +0000
committerDavide Italiano <davide@freebsd.org>2016-05-10 19:49:47 +0000
commit7860c9bbf4779a109c915f5c935017758df29afd (patch)
treea11163c9f8c7ffb5978de8ab488adfd07dd008ed /llvm/lib/Transforms/Scalar/SCCP.cpp
parent1f4af49a5d2aaa791114ad07c5ceffc4606799c2 (diff)
downloadbcm5719-llvm-7860c9bbf4779a109c915f5c935017758df29afd.tar.gz
bcm5719-llvm-7860c9bbf4779a109c915f5c935017758df29afd.zip
[SCCP] Partially propagate informations when the input is not fully defined.
With this patch: %r1 = lshr i64 -1, 4294967296 -> undef Before this patch: %r1 = lshr i64 -1, 4294967296 -> 0 llvm-svn: 269105
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SCCP.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index 75414ef3864..49748ff4c43 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -1331,6 +1331,9 @@ bool SCCPSolver::ResolvedUndefsIn(Function &F) {
}
Op1LV = getValueState(I.getOperand(1));
+
+ if (!Op0LV.isUndefined() && !Op1LV.isUndefined())
+ break;
}
// If this is an instructions whose result is defined even if the input is
// not fully defined, propagate the information.
OpenPOWER on IntegriCloud