summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorKeno Fischer <kfischer@college.harvard.edu>2015-11-16 04:47:58 +0000
committerKeno Fischer <kfischer@college.harvard.edu>2015-11-16 04:47:58 +0000
commit86c95b5642807d2aba091f437d11691b3a285439 (patch)
tree907f352738a1de8470b9e8f5340aad98fa3035ec /llvm/lib/Transforms
parent678125d7ec3c9b42ce106a4836b4345577733213 (diff)
downloadbcm5719-llvm-86c95b5642807d2aba091f437d11691b3a285439.tar.gz
bcm5719-llvm-86c95b5642807d2aba091f437d11691b3a285439.zip
[Sink] Don't move landingpads
Summary: Moving landingpads into successor basic blocks makes the verifier sad. Teach Sink that much like PHI nodes and terminator instructions, landingpads (and cleanuppads, etc.) may not be moved between basic blocks. Reviewers: majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14475 llvm-svn: 253182
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/Sink.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/Sink.cpp b/llvm/lib/Transforms/Scalar/Sink.cpp
index f6ccd999ea0..7c0ac7aa6fa 100644
--- a/llvm/lib/Transforms/Scalar/Sink.cpp
+++ b/llvm/lib/Transforms/Scalar/Sink.cpp
@@ -169,7 +169,7 @@ static bool isSafeToMove(Instruction *Inst, AliasAnalysis *AA,
return false;
}
- if (isa<TerminatorInst>(Inst) || isa<PHINode>(Inst))
+ if (isa<TerminatorInst>(Inst) || isa<PHINode>(Inst) || Inst->isEHPad())
return false;
// Convergent operations cannot be made control-dependent on additional
OpenPOWER on IntegriCloud