From de8d3b73c85aa1a68959d296088fe022c839003f Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Tue, 24 Nov 2009 11:51:52 +0000 Subject: Fix for PR5373, Credit to Jakub Staszak. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89758 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/LoopUnswitch/5373.ll | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/Transforms/LoopUnswitch/5373.ll (limited to 'test/Transforms/LoopUnswitch') diff --git a/test/Transforms/LoopUnswitch/5373.ll b/test/Transforms/LoopUnswitch/5373.ll new file mode 100644 index 0000000000..77b78350c5 --- /dev/null +++ b/test/Transforms/LoopUnswitch/5373.ll @@ -0,0 +1,24 @@ +; RUN: opt < %s -loop-unswitch -stats -disable-output |& grep "3 loop-unswitch - Number of branches unswitched" + +define noalias i32* @func_16(i32** %p_18, i32* %p_20) noreturn nounwind ssp { +entry: + %lnot = icmp eq i32** %p_18, null ; [#uses=1] + %lnot6 = icmp eq i32* %p_20, null ; [#uses=1] + br label %for.body + +for.body: ; preds = %cond.end, %entry + br i1 %lnot, label %cond.end, label %cond.true + +cond.true: ; preds = %for.body + tail call void @f() + unreachable + +cond.end: ; preds = %for.body + br i1 %lnot6, label %for.body, label %cond.true10 + +cond.true10: ; preds = %cond.end + tail call void @f() + unreachable +} + +declare void @f() noreturn -- cgit v1.2.3