jump threading can't split a critical edge from an indirectbr. This

fixes PR7356.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105950 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-06-14 19:45:43 +00:00
parent 12b8bc1b01
commit e58867e55e
2 changed files with 28 additions and 1 deletions
+6 -1
View File
@@ -870,9 +870,14 @@ bool JumpThreading::SimplifyPartiallyRedundantLoad(LoadInst *LI) {
// Add all the unavailable predecessors to the PredsToSplit list.
for (pred_iterator PI = pred_begin(LoadBB), PE = pred_end(LoadBB);
PI != PE; ++PI)
PI != PE; ++PI) {
// If the predecessor is an indirect goto, we can't split the edge.
if (isa<IndirectBrInst>((*PI)->getTerminator()))
return false;
if (!AvailablePredSet.count(*PI))
PredsToSplit.push_back(*PI);
}
// Split them out to their own block.
UnavailablePred =