blob: f2d8090aa0aca6390415c9137f23de548b3e2f95 [file] [log] [blame]
Juergen Ributzka31328162014-08-28 02:06:55 +00001; RUN: llc -mtriple=aarch64-apple-darwin -fast-isel -verify-machineinstrs < %s
2; REQUIRES: asserts
3
4; Test that the Machine Instruction PHI node doesn't have more than one operand
5; from the same predecessor.
6define i32 @foo(i32 %a, i32 %b, i1 %c) {
7entry:
8 br i1 %c, label %switch, label %direct
9
10switch:
11 switch i32 %a, label %exit [
12 i32 43, label %continue
13 i32 45, label %continue
14 ]
15
16direct:
17 %var = add i32 %b, 1
18 br label %continue
19
20continue:
21 %var.phi = phi i32 [ %var, %direct ], [ 0, %switch ], [ 0, %switch ]
22 ret i32 %var.phi
23
24exit:
25 ret i32 1
26}