1; RUN: opt < %s -lcssa -verify -S -o /dev/null 2 3; This bugpoint reduced test case used to assert when removing unused PHI nodes. 4; Just verify that we do not assert/crash. 5 6define void @test() { 7entry: 8 br label %gazank 9 10gazank: 11 %value = phi i16 [ 0, %entry ], [ undef, %gazonk ] 12 br i1 undef, label %gazink, label %qqq 13 14gazink: 15 br i1 undef, label %gazonk, label %infinite.loop.pred 16 17gazonk: 18 br i1 undef, label %exit1, label %gazank 19 20qqq: 21 br i1 undef, label %www, label %exit2 22 23www: 24 br i1 undef, label %qqq, label %foo.pred 25 26foo.pred: 27 br label %foo 28 29foo: 30 br i1 undef, label %bar, label %exit1.pred 31 32bar: 33 br i1 undef, label %foo, label %exit2.pred 34 35unreachable1: 36 br i1 undef, label %foo, label %exit2.pred 37 38exit1.pred: 39 br label %exit1 40 41exit1: 42 ret void 43 44exit2.pred: 45 br label %exit2 46 47exit2: 48 ret void 49 50infinite.loop.pred: 51 br label %infinite.loop 52 53infinite.loop: 54 %dead = phi i16 [ %value, %infinite.loop.pred ], [ 0, %infinite.loop ] 55 br label %infinite.loop 56} 57