Make Loop::getLoopLatch() work on loops which don't have preheaders, as
authorDan Gohman <gohman@apple.com>
Fri, 20 Nov 2009 20:51:18 +0000 (20:51 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 20 Nov 2009 20:51:18 +0000 (20:51 +0000)
commita58a04921deba911d6ead8d24f495cec234681c1
treeb051c1c24f3d53ceea308c0a6ca0ddb599f21e57
parent6a2392131e2e5b8c4123d69cc959831b4fe719ca
Make Loop::getLoopLatch() work on loops which don't have preheaders, as
it may be used in contexts where preheader insertion may have failed due
to an indirectbr.

Make LoopSimplify's LoopSimplify::SeparateNestedLoop properly fail in
the case that it would require splitting an indirectbr edge.

These fix PR5502.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89484 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/LoopInfo.h
lib/Transforms/Utils/LoopSimplify.cpp
test/Transforms/LoopRotate/indirectbr.ll [new file with mode: 0644]
test/Transforms/LoopSimplify/indirectbr.ll