diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-12 01:41:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-12 01:41:34 +0000 |
commit | ba4561695890335ae7f089f7872a4d2d09236aed (patch) | |
tree | 5b5b3774668ed02cb46d261b74b4c19ba9da8147 /llvm/lib/Transforms/Scalar/JumpThreading.cpp | |
parent | 3f80d8519130ab0d9139f0023076bd18216d6c5f (diff) | |
download | bcm5719-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.cpp | 7 |
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)) |