diff options
author | Dan Gohman <gohman@apple.com> | 2009-10-19 16:04:50 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-10-19 16:04:50 +0000 |
commit | 8f986672a124bee96d30d7aa9b9ab2b205f37345 (patch) | |
tree | 2ade05886064fbdf879d866b898335a723fd7063 /llvm/test/Transforms | |
parent | b0db9917afdb1ef5da6ad7d36bfe5fbfc0f43c45 (diff) | |
download | bcm5719-llvm-8f986672a124bee96d30d7aa9b9ab2b205f37345.tar.gz bcm5719-llvm-8f986672a124bee96d30d7aa9b9ab2b205f37345.zip |
Fix SplitBlockPredecessors' LoopInfo updating code to handle the case
where a loop's header is being split and it has predecessors which are not
contained by the most-nested loop which contains the loop.
This fixes PR5235.
llvm-svn: 84505
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r-- | llvm/test/Transforms/LoopSimplify/unreachable-loop-pred.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LoopSimplify/unreachable-loop-pred.ll b/llvm/test/Transforms/LoopSimplify/unreachable-loop-pred.ll new file mode 100644 index 00000000000..faaaf97d72f --- /dev/null +++ b/llvm/test/Transforms/LoopSimplify/unreachable-loop-pred.ll @@ -0,0 +1,20 @@ +; RUN: opt -S -loopsimplify -disable-output -verify-loop-info -verify-dom-info < %s +; PR5235 + +; When loopsimplify inserts a preheader for this loop, it should add the new +; block to the enclosing loop and not get confused by the unreachable +; bogus loop entry. + +define void @is_extract_cab() nounwind { +entry: + br label %header + +header: ; preds = %if.end206, %cond.end66, %if.end23 + br label %while.body115 + +while.body115: ; preds = %9, %if.end192, %if.end101 + br i1 undef, label %header, label %while.body115 + +foo: + br label %while.body115 +} |