2002-08-22-DominanceProblem.ll 486 B

123456789101112131415161718
  1. ; RUN: llvm-as %s -o /dev/null
  2. ; RUN: verify-uselistorder %s
  3. ; Dominance relationships is not calculated correctly for unreachable blocks,
  4. ; which causes the verifier to barf on this input.
  5. define i32 @test(i1 %b) {
  6. BB0:
  7. ret i32 7 ; Loop is unreachable
  8. Loop: ; preds = %L2, %Loop
  9. %B = phi i32 [ %B, %L2 ], [ %B, %Loop ] ;PHI has same value always.
  10. br i1 %b, label %L2, label %Loop
  11. L2: ; preds = %Loop
  12. br label %Loop
  13. }