diff options
author | Dan Gohman <gohman@apple.com> | 2009-11-20 20:51:18 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-11-20 20:51:18 +0000 |
commit | fbffe635282804ad2e30248368ddc2ec9dc65b6a (patch) | |
tree | 45a8941be29ffbefe8887e9e9da52c1bc977512b /llvm/test/Transforms/LoopSimplify | |
parent | d15302afa04f5abaad8fd36217d10de9dd3d7a85 (diff) | |
download | bcm5719-llvm-fbffe635282804ad2e30248368ddc2ec9dc65b6a.tar.gz bcm5719-llvm-fbffe635282804ad2e30248368ddc2ec9dc65b6a.zip |
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.
llvm-svn: 89484
Diffstat (limited to 'llvm/test/Transforms/LoopSimplify')
-rw-r--r-- | llvm/test/Transforms/LoopSimplify/indirectbr.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LoopSimplify/indirectbr.ll b/llvm/test/Transforms/LoopSimplify/indirectbr.ll index b0238473b68..2e4549d1e9c 100644 --- a/llvm/test/Transforms/LoopSimplify/indirectbr.ll +++ b/llvm/test/Transforms/LoopSimplify/indirectbr.ll @@ -81,3 +81,20 @@ L1: %y = phi i64 [ %z, %L0 ], [ 1, %entry ] ret i64 %y } + +define void @pr5502() nounwind { +entry: + br label %while.cond + +while.cond: + br i1 undef, label %while.body, label %while.end + +while.body: + indirectbr i8* undef, [label %end_opcode, label %end_opcode] + +end_opcode: + br i1 false, label %end_opcode, label %while.cond + +while.end: + ret void +} |