blob: 291f0848cb2b11bc0908c0f38e3cf0c4a64b0260 [file] [log] [blame]
Eli Benderskyaa3ffaf2013-04-08 18:33:51 +00001; RUN: not llvm-as < %s 2>&1 | FileCheck %s
2; CHECK: PHI nodes not grouped at top
Chris Lattner18b412d2002-06-08 17:33:16 +00003
Nick Lewyckyec6f1662008-03-16 07:55:46 +00004define i32 @test(i32 %i, i32 %j, i1 %c) {
5 br i1 %c, label %A, label %B
Chris Lattner18b412d2002-06-08 17:33:16 +00006A:
7 br label %C
8B:
9 br label %C
10
11C:
Nick Lewyckyec6f1662008-03-16 07:55:46 +000012 %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
Chris Lattner18b412d2002-06-08 17:33:16 +000016}