back out r108131 (of TailDuplication.cpp) for now, it causes a buildbot failure

llvm-svn: 108135
This commit is contained in:
Gabor Greif 2010-07-12 11:32:39 +00:00
parent 6143704ac5
commit f9610827ce
1 changed files with 4 additions and 5 deletions

View File

@ -206,14 +206,13 @@ static BasicBlock *FindObviousSharedDomOf(BasicBlock *SrcBlock,
// there is only one other pred, get it, otherwise we can't handle it.
PI = pred_begin(DstBlock); PE = pred_end(DstBlock);
BasicBlock *DstOtherPred = 0;
BasicBlock *P = *PI;
if (P == SrcBlock) {
if (*PI == SrcBlock) {
if (++PI == PE) return 0;
DstOtherPred = P;
DstOtherPred = *PI;
if (++PI != PE) return 0;
} else {
DstOtherPred = P;
if (++PI == PE || P != SrcBlock || ++PI != PE) return 0;
DstOtherPred = *PI;
if (++PI == PE || *PI != SrcBlock || ++PI != PE) return 0;
}
// We can handle two situations here: "if then" and "if then else" blocks. An