blob: ca4035e35987eaa040784d5dfe3a2d6ee4e00cc0 [file] [log] [blame]
Pete Couperus2d1f6d62017-08-24 15:40:33 +00001; RUN: llc -march=arc < %s | FileCheck %s
2
3; CHECK-LABEL: brcc1
4; CHECK: brne %r0, %r1
5define i32 @brcc1(i32 %a, i32 %b) nounwind {
6entry:
7 %wb = icmp eq i32 %a, %b
8 br i1 %wb, label %t1, label %t2
9t1:
10 %t1v = add i32 %a, 4
11 br label %exit
12t2:
13 %t2v = add i32 %b, 8
14 br label %exit
15exit:
16 %v = phi i32 [ %t1v, %t1 ], [ %t2v, %t2 ]
17 ret i32 %v
18}
19
20; CHECK-LABEL: brcc2
21; CHECK: breq %r0, %r1
22define i32 @brcc2(i32 %a, i32 %b) nounwind {
23entry:
24 %wb = icmp ne i32 %a, %b
25 br i1 %wb, label %t1, label %t2
26t1:
27 %t1v = add i32 %a, 4
28 br label %exit
29t2:
30 %t2v = add i32 %b, 8
31 br label %exit
32exit:
33 %v = phi i32 [ %t1v, %t1 ], [ %t2v, %t2 ]
34 ret i32 %v
35}
36
37