summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/JumpThreading.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-12 01:41:34 +0000
committerChris Lattner <sabre@nondot.org>2009-11-12 01:41:34 +0000
commitba4561695890335ae7f089f7872a4d2d09236aed (patch)
tree5b5b3774668ed02cb46d261b74b4c19ba9da8147 /llvm/lib/Transforms/Scalar/JumpThreading.cpp
parent3f80d8519130ab0d9139f0023076bd18216d6c5f (diff)
downloadbcm5719-llvm-ba4561695890335ae7f089f7872a4d2d09236aed.tar.gz
bcm5719-llvm-ba4561695890335ae7f089f7872a4d2d09236aed.zip
with the new code we can thread non-instruction values. This
allows us to handle the test10 testcase. llvm-svn: 86924
Diffstat (limited to 'llvm/lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/JumpThreading.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index e7ca0f4b50f..47bebf90d3c 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -518,8 +518,13 @@ bool JumpThreading::ProcessBlock(BasicBlock *BB) {
}
// All the rest of our checks depend on the condition being an instruction.
- if (CondInst == 0)
+ if (CondInst == 0) {
+ // FIXME: Unify this with code below.
+ if (LVI && ProcessThreadableEdges(Condition, BB))
+ return true;
return false;
+ }
+
// See if this is a phi node in the current block.
if (PHINode *PN = dyn_cast<PHINode>(CondInst))
OpenPOWER on IntegriCloud