summaryrefslogtreecommitdiff
path: root/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
commit87e9f59c7a823ba86d8aafa4e15ac03e6db244c3 (patch)
treee83afecfd662d89dd8a570f1954de4aab4b6a6b5 /lib/Transforms/Scalar/JumpThreading.cpp
parent1c96b4187be7589492dccf33e9fe7679ac61023d (diff)
downloadllvm-87e9f59c7a823ba86d8aafa4e15ac03e6db244c3.tar.gz
llvm-87e9f59c7a823ba86d8aafa4e15ac03e6db244c3.tar.bz2
llvm-87e9f59c7a823ba86d8aafa4e15ac03e6db244c3.tar.xz
with the new code we can thread non-instruction values. This
allows us to handle the test10 testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r--lib/Transforms/Scalar/JumpThreading.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp
index e7ca0f4b50..47bebf90d3 100644
--- a/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/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))