blob: 7b42fd28e3d878e57bd1474a7d0f31902b4fa9b5 [file] [log] [blame]
Chandler Carruth49589f02012-07-02 18:37:59 +00001; RUN: not llvm-as < %s 2>&1 | grep "PHI nodes not grouped at top"
Tanya Lattner2393a242004-11-06 23:08:26 +00002
Chris Lattner23e07e72002-06-08 17:33:16 +00003
4
Nick Lewycky3f637852008-03-16 07:55:46 +00005define i32 @test(i32 %i, i32 %j, i1 %c) {
6 br i1 %c, label %A, label %B
Chris Lattner23e07e72002-06-08 17:33:16 +00007A:
8 br label %C
9B:
10 br label %C
11
12C:
Nick Lewycky3f637852008-03-16 07:55:46 +000013 %a = phi i32 [%i, %A], [%j, %B]
14 %x = add i32 %a, 0 ; Error, PHI's should be grouped!
15 %b = phi i32 [%i, %A], [%j, %B]
16 ret i32 %x
Chris Lattner23e07e72002-06-08 17:33:16 +000017}