1 ; RUN: llc < %s -march=arm -mtriple=arm-apple-darwin | \
2 ; RUN: grep cmpne | count 1
3 ; RUN: llc < %s -march=arm -mtriple=arm-apple-darwin | \
4 ; RUN: grep bls | count 1
5 ; Here, tail call wins over eliminating branches. It is 1 fewer instruction
6 ; and removes all stack accesses, so seems like a win.
8 define void @foo(i32 %X, i32 %Y) {
10 %tmp1 = icmp ult i32 %X, 4 ; <i1> [#uses=1]
11 %tmp4 = icmp eq i32 %Y, 0 ; <i1> [#uses=1]
12 %tmp7 = or i1 %tmp4, %tmp1 ; <i1> [#uses=1]
13 br i1 %tmp7, label %cond_true, label %UnifiedReturnBlock
15 cond_true: ; preds = %entry
16 %tmp10 = tail call i32 (...)* @bar( ) ; <i32> [#uses=0]
19 UnifiedReturnBlock: ; preds = %entry