diff options
author | Hans Wennborg <hans@hanshq.net> | 2016-10-03 18:18:04 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2016-10-03 18:18:04 +0000 |
commit | b4d2678c6f2c8e411bd2f59e58667a3a1921ae8a (patch) | |
tree | 0e21647525863e28337d882dba2e299de83819c0 /llvm/lib/Transforms/Scalar/JumpThreading.cpp | |
parent | 2ee505e715c5ba2318ed26c0925804fe095145a6 (diff) | |
download | bcm5719-llvm-b4d2678c6f2c8e411bd2f59e58667a3a1921ae8a.tar.gz bcm5719-llvm-b4d2678c6f2c8e411bd2f59e58667a3a1921ae8a.zip |
Jump threading: avoid trying to split edge into landingpad block (PR27840)
Splitting the edge is nontrivial because of the landing pad, and we would
currently assert trying to do it.
Differential Revision: https://reviews.llvm.org/D24680
llvm-svn: 283129
Diffstat (limited to 'llvm/lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/JumpThreading.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index 6375f089790..ddad3004fc7 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -1331,6 +1331,10 @@ bool JumpThreadingPass::ProcessBranchOnXOR(BinaryOperator *BO) { if (!isa<PHINode>(BB->front())) return false; + // If this BB is a landing pad, we won't be able to split the edge into it. + if (BB->isEHPad()) + return false; + // If we have a xor as the branch input to this block, and we know that the // LHS or RHS of the xor in any predecessor is true/false, then we can clone // the condition into the predecessor and fix that value to true, saving some |