Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -march=arm | FileCheck %s
      2 
      3 ; Do not if-convert when branches go to the different loops.
      4 ; CHECK-LABEL: t:
      5 ; CHECK-NOT: subgt
      6 ; CHECK-NOT: suble
      7 ; Don't use
      8 define i32 @t(i32 %a, i32 %b) {
      9 entry:
     10 	%tmp1434 = icmp eq i32 %a, %b		; <i1> [#uses=1]
     11 	br i1 %tmp1434, label %bb17, label %bb.outer
     12 
     13 bb.outer:		; preds = %cond_false, %entry
     14 	%b_addr.021.0.ph = phi i32 [ %b, %entry ], [ %tmp10, %cond_false ]		; <i32> [#uses=5]
     15 	%a_addr.026.0.ph = phi i32 [ %a, %entry ], [ %a_addr.026.0, %cond_false ]		; <i32> [#uses=1]
     16 	br label %bb
     17 
     18 bb:		; preds = %cond_true, %bb.outer
     19 	%indvar = phi i32 [ 0, %bb.outer ], [ %indvar.next, %cond_true ]		; <i32> [#uses=2]
     20 	%tmp. = sub i32 0, %b_addr.021.0.ph		; <i32> [#uses=1]
     21 	%tmp.40 = mul i32 %indvar, %tmp.		; <i32> [#uses=1]
     22 	%a_addr.026.0 = add i32 %tmp.40, %a_addr.026.0.ph		; <i32> [#uses=6]
     23 	%tmp3 = icmp sgt i32 %a_addr.026.0, %b_addr.021.0.ph		; <i1> [#uses=1]
     24 	br i1 %tmp3, label %cond_true, label %cond_false
     25 
     26 cond_true:		; preds = %bb
     27 	%tmp7 = sub i32 %a_addr.026.0, %b_addr.021.0.ph		; <i32> [#uses=2]
     28 	%tmp1437 = icmp eq i32 %tmp7, %b_addr.021.0.ph		; <i1> [#uses=1]
     29 	%indvar.next = add i32 %indvar, 1		; <i32> [#uses=1]
     30 	br i1 %tmp1437, label %bb17, label %bb
     31 
     32 cond_false:		; preds = %bb
     33 	%tmp10 = sub i32 %b_addr.021.0.ph, %a_addr.026.0		; <i32> [#uses=2]
     34 	%tmp14 = icmp eq i32 %a_addr.026.0, %tmp10		; <i1> [#uses=1]
     35 	br i1 %tmp14, label %bb17, label %bb.outer
     36 
     37 bb17:		; preds = %cond_false, %cond_true, %entry
     38 	%a_addr.026.1 = phi i32 [ %a, %entry ], [ %tmp7, %cond_true ], [ %a_addr.026.0, %cond_false ]		; <i32> [#uses=1]
     39 	ret i32 %a_addr.026.1
     40 }
     41