a previous patch completely disabled trivial unswitching, this fixees it.

Thanks to nate for pointing this out :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26280 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-02-18 01:32:04 +00:00
parent f4412d890d
commit caf4893536

View File

@ -168,7 +168,6 @@ static bool isTrivialLoopExitBlockHelper(Loop *L, BasicBlock *BB,
static BasicBlock *isTrivialLoopExitBlock(Loop *L, BasicBlock *BB) {
std::set<BasicBlock*> Visited;
Visited.insert(L->getHeader()); // Branches to header are ok.
Visited.insert(BB); // Don't revisit BB after we do.
BasicBlock *ExitBB = 0;
if (isTrivialLoopExitBlockHelper(L, BB, ExitBB, Visited))
return ExitBB;