1 ; RUN: llc < %s -mtriple=arm-apple-darwin -mcpu=cortex-a8 | FileCheck %s -check-prefix=ARM
2 ; RUN: llc < %s -mtriple=thumb-apple-darwin -mcpu=cortex-a8 | FileCheck %s -check-prefix=T2
5 define i32 @t1(i32 %a, i32 %b, i32 %c) nounwind {
7 ; ARM: sub r0, r1, #6, #2
11 ; T2: mvn r0, #-2147483648
14 %tmp1 = icmp sgt i32 %c, 10
15 %tmp2 = select i1 %tmp1, i32 0, i32 2147483647
16 %tmp3 = add i32 %tmp2, %b
20 define i32 @t2(i32 %a, i32 %b, i32 %c, i32 %d) nounwind {
22 ; ARM: sub r0, r1, #10
26 ; T2: sub.w r0, r1, #10
28 %tmp1 = icmp sgt i32 %c, 10
29 %tmp2 = select i1 %tmp1, i32 0, i32 10
30 %tmp3 = sub i32 %b, %tmp2
34 define i32 @t3(i32 %a, i32 %b, i32 %x, i32 %y) nounwind {
41 ; T2: and.w r0, r2, r3
42 %cond = icmp slt i32 %a, %b
43 %z = select i1 %cond, i32 -1, i32 %x
48 define i32 @t4(i32 %a, i32 %b, i32 %x, i32 %y) nounwind {
55 ; T2: orr.w r0, r2, r3
56 %cond = icmp slt i32 %a, %b
57 %z = select i1 %cond, i32 0, i32 %x