diff options
| author | Dan Gohman <gohman@apple.com> | 2009-12-11 20:05:23 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-12-11 20:05:23 +0000 |
| commit | 050959cd08db6c0efb8208271a1d64ce58893e20 (patch) | |
| tree | 53ad47d72a8d218149180c46d19f401a05e78b60 /test | |
| parent | a4f9cc4e55fa12ddff95c2e9d0091077797f0b22 (diff) | |
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
Diffstat (limited to 'test')
| -rw-r--r-- | test/Transforms/IndVarSimplify/indirectbr.ll | 22 |
1 files changed, 22 insertions, 0 deletions
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 ; <i32> [#uses=1] + br label %"133" + +"133": ; preds = %"132", %entry + %1 = phi i32 [ %0, %"132" ], [ 0, %entry ] ; <i32> [#uses=2] + %2 = icmp eq i32 %1, 4 ; <i1> [#uses=1] + br i1 %2, label %"134", label %"132" + +"134": ; preds = %"133" + ret i1 true + +"202": ; preds = %entry + ret i1 false +} |
