blob: 81c6129d85ec5f88d0c9766300befea5f6620f94 [file] [log] [blame]
Tanya Lattner6e9bcee2008-02-14 07:57:12 +00001; RUN: llvm-as < %s -o /dev/null -f
Tanya Lattnere7e3f2e2004-11-06 22:07:09 +00002
Chris Lattnerc6424352002-08-22 20:30:06 +00003; Dominance relationships is not calculated correctly for unreachable blocks,
4; which causes the verifier to barf on this input.
5
Tanya Lattner6e9bcee2008-02-14 07:57:12 +00006define i32 @test(i1 %b) {
7BB0:
8 ret i32 7 ; Loop is unreachable
Chris Lattnerc6424352002-08-22 20:30:06 +00009
Tanya Lattner6e9bcee2008-02-14 07:57:12 +000010Loop: ; preds = %L2, %Loop
11 %B = phi i32 [ %B, %L2 ], [ %B, %Loop ] ;PHI has same value always.
12 br i1 %b, label %L2, label %Loop
13
14L2: ; preds = %Loop
Chris Lattnerc6424352002-08-22 20:30:06 +000015 br label %Loop
16}
17