1 ; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios -verify-machineinstrs | FileCheck %s --check-prefix=ARM
2 ; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi -verify-machineinstrs | FileCheck %s --check-prefix=ARM
3 ; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios -verify-machineinstrs | FileCheck %s --check-prefix=THUMB
5 define i32 @icmp_i16_signed(i16 %a, i16 %b) nounwind {
11 ; THUMB: icmp_i16_signed
15 %cmp = icmp slt i16 %a, %b
16 %conv2 = zext i1 %cmp to i32
20 define i32 @icmp_i16_unsigned(i16 %a, i16 %b) nounwind {
22 ; ARM: icmp_i16_unsigned
26 ; THUMB: icmp_i16_unsigned
30 %cmp = icmp ult i16 %a, %b
31 %conv2 = zext i1 %cmp to i32
35 define i32 @icmp_i8_signed(i8 %a, i8 %b) nounwind {
41 ; THUMB: icmp_i8_signed
45 %cmp = icmp sgt i8 %a, %b
46 %conv2 = zext i1 %cmp to i32
50 define i32 @icmp_i8_unsigned(i8 %a, i8 %b) nounwind {
52 ; ARM: icmp_i8_unsigned
53 ; ARM: and r0, r0, #255
54 ; ARM: and r1, r1, #255
56 ; THUMB: icmp_i8_unsigned
57 ; THUMB: and r0, r0, #255
58 ; THUMB: and r1, r1, #255
60 %cmp = icmp ugt i8 %a, %b
61 %conv2 = zext i1 %cmp to i32
65 define i32 @icmp_i1_unsigned(i1 %a, i1 %b) nounwind {
67 ; ARM: icmp_i1_unsigned
71 ; THUMB: icmp_i1_unsigned
72 ; THUMB: and r0, r0, #1
73 ; THUMB: and r1, r1, #1
75 %cmp = icmp ult i1 %a, %b
76 %conv2 = zext i1 %cmp to i32