• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=arm-eabi %s -o - | FileCheck %s
2
3; CHECK-LABEL: t:
4; CHECK: subgt
5; CHECK: suble
6define i32 @t(i32 %a, i32 %b) {
7entry:
8	%tmp1434 = icmp eq i32 %a, %b		; <i1> [#uses=1]
9	br i1 %tmp1434, label %bb17, label %bb.outer
10
11bb.outer:		; preds = %cond_false, %entry
12	%b_addr.021.0.ph = phi i32 [ %b, %entry ], [ %tmp10, %cond_false ]		; <i32> [#uses=5]
13	%a_addr.026.0.ph = phi i32 [ %a, %entry ], [ %a_addr.026.0, %cond_false ]		; <i32> [#uses=1]
14	br label %bb
15
16bb:		; preds = %cond_true, %bb.outer
17	%indvar = phi i32 [ 0, %bb.outer ], [ %indvar.next, %cond_true ]		; <i32> [#uses=2]
18	%tmp. = sub i32 0, %b_addr.021.0.ph		; <i32> [#uses=1]
19	%tmp.40 = mul i32 %indvar, %tmp.		; <i32> [#uses=1]
20	%a_addr.026.0 = add i32 %tmp.40, %a_addr.026.0.ph		; <i32> [#uses=6]
21	%tmp3 = icmp sgt i32 %a_addr.026.0, %b_addr.021.0.ph		; <i1> [#uses=1]
22	br i1 %tmp3, label %cond_true, label %cond_false
23
24cond_true:		; preds = %bb
25	%tmp7 = sub i32 %a_addr.026.0, %b_addr.021.0.ph		; <i32> [#uses=2]
26	%tmp1437 = icmp eq i32 %tmp7, %b_addr.021.0.ph		; <i1> [#uses=1]
27	%indvar.next = add i32 %indvar, 1		; <i32> [#uses=1]
28	br i1 %tmp1437, label %bb17, label %bb
29
30cond_false:		; preds = %bb
31	%tmp10 = sub i32 %b_addr.021.0.ph, %a_addr.026.0		; <i32> [#uses=2]
32	%tmp14 = icmp eq i32 %a_addr.026.0, %tmp10		; <i1> [#uses=1]
33	br i1 %tmp14, label %bb17, label %bb.outer
34
35bb17:		; preds = %cond_false, %cond_true, %entry
36	%a_addr.026.1 = phi i32 [ %a, %entry ], [ %tmp7, %cond_true ], [ %a_addr.026.0, %cond_false ]		; <i32> [#uses=1]
37	ret i32 %a_addr.026.1
38}
39