From 050959cd08db6c0efb8208271a1d64ce58893e20 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Dec 2009 20:05:23 +0000 Subject: Make getUniqueExitBlocks's precondition assert more precise, to avoid spurious failures. This fixes PR5758. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91147 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/IndVarSimplify/indirectbr.ll | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/Transforms/IndVarSimplify/indirectbr.ll (limited to 'test/Transforms') diff --git a/test/Transforms/IndVarSimplify/indirectbr.ll b/test/Transforms/IndVarSimplify/indirectbr.ll new file mode 100644 index 0000000000..b4ce153244 --- /dev/null +++ b/test/Transforms/IndVarSimplify/indirectbr.ll @@ -0,0 +1,22 @@ +; RUN: opt < %s -indvars -S -disable-output +; PR5758 + +define zeroext i1 @foo() nounwind { +entry: + indirectbr i8* undef, [label %"202", label %"133"] + +"132": ; preds = %"133" + %0 = add i32 %1, 1 ; [#uses=1] + br label %"133" + +"133": ; preds = %"132", %entry + %1 = phi i32 [ %0, %"132" ], [ 0, %entry ] ; [#uses=2] + %2 = icmp eq i32 %1, 4 ; [#uses=1] + br i1 %2, label %"134", label %"132" + +"134": ; preds = %"133" + ret i1 true + +"202": ; preds = %entry + ret i1 false +} -- cgit v1.2.3-70-g09d2