1 ; RUN: llc < %s -mtriple=thumb-apple-darwin | FileCheck %s 2 ; RUN: llc < %s -mtriple=thumb-pc-linux-gnueabi | FileCheck -check-prefix=CHECK-EABI %s 3 4 define i32 @f1(i32 %a.s) { 5 entry: 6 %tmp = icmp eq i32 %a.s, 4 7 %tmp1.s = select i1 %tmp, i32 2, i32 3 8 ret i32 %tmp1.s 9 } 10 ; CHECK: f1: 11 ; CHECK: beq 12 ; CHECK-EABI: f1: 13 ; CHECK-EABI: beq 14 15 define i32 @f2(i32 %a.s) { 16 entry: 17 %tmp = icmp sgt i32 %a.s, 4 18 %tmp1.s = select i1 %tmp, i32 2, i32 3 19 ret i32 %tmp1.s 20 } 21 ; CHECK: f2: 22 ; CHECK: bgt 23 ; CHECK-EABI: f2: 24 ; CHECK-EABI: bgt 25 26 define i32 @f3(i32 %a.s, i32 %b.s) { 27 entry: 28 %tmp = icmp slt i32 %a.s, %b.s 29 %tmp1.s = select i1 %tmp, i32 2, i32 3 30 ret i32 %tmp1.s 31 } 32 ; CHECK: f3: 33 ; CHECK: blt 34 ; CHECK-EABI: f3: 35 ; CHECK-EABI: blt 36 37 define i32 @f4(i32 %a.s, i32 %b.s) { 38 entry: 39 %tmp = icmp sle i32 %a.s, %b.s 40 %tmp1.s = select i1 %tmp, i32 2, i32 3 41 ret i32 %tmp1.s 42 } 43 ; CHECK: f4: 44 ; CHECK: ble 45 ; CHECK-EABI: f4: 46 ; CHECK-EABI: ble 47 48 define i32 @f5(i32 %a.u, i32 %b.u) { 49 entry: 50 %tmp = icmp ule i32 %a.u, %b.u 51 %tmp1.s = select i1 %tmp, i32 2, i32 3 52 ret i32 %tmp1.s 53 } 54 ; CHECK: f5: 55 ; CHECK: bls 56 ; CHECK-EABI: f5: 57 ; CHECK-EABI: bls 58 59 define i32 @f6(i32 %a.u, i32 %b.u) { 60 entry: 61 %tmp = icmp ugt i32 %a.u, %b.u 62 %tmp1.s = select i1 %tmp, i32 2, i32 3 63 ret i32 %tmp1.s 64 } 65 ; CHECK: f6: 66 ; CHECK: bhi 67 ; CHECK-EABI: f6: 68 ; CHECK-EABI: bhi 69 70 define double @f7(double %a, double %b) { 71 %tmp = fcmp olt double %a, 1.234e+00 72 %tmp1 = select i1 %tmp, double -1.000e+00, double %b 73 ret double %tmp1 74 } 75 ; CHECK: f7: 76 ; CHECK: blt 77 ; CHECK: blt 78 ; CHECK: __ltdf2 79 ; CHECK-EABI: f7: 80 ; CHECK-EABI: __aeabi_dcmplt 81 ; CHECK-EABI: bne 82 ; CHECK-EABI: bne 83