PhiGrouping.ll 341 B

12345678910111213141516
  1. ; RUN: not llvm-as < %s 2>&1 | FileCheck %s
  2. ; CHECK: PHI nodes not grouped at top
  3. define i32 @test(i32 %i, i32 %j, i1 %c) {
  4. br i1 %c, label %A, label %B
  5. A:
  6. br label %C
  7. B:
  8. br label %C
  9. C:
  10. %a = phi i32 [%i, %A], [%j, %B]
  11. %x = add i32 %a, 0 ; Error, PHI's should be grouped!
  12. %b = phi i32 [%i, %A], [%j, %B]
  13. ret i32 %x
  14. }