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