diff options
Diffstat (limited to 'test/Transforms/LoopSimplify/unreachable-loop-pred.ll')
-rw-r--r-- | test/Transforms/LoopSimplify/unreachable-loop-pred.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Transforms/LoopSimplify/unreachable-loop-pred.ll b/test/Transforms/LoopSimplify/unreachable-loop-pred.ll new file mode 100644 index 0000000..faaaf97 --- /dev/null +++ b/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 +} |