Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s
      2 ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s
      3 
      4 ; Sign-extend of i1 currently not supported by fast-isel
      5 ;define signext i1 @ret0(i1 signext %a) nounwind uwtable ssp {
      6 ;entry:
      7 ;  ret i1 %a
      8 ;}
      9 
     10 define zeroext i1 @ret1(i1 signext %a) nounwind uwtable ssp {
     11 entry:
     12 ; CHECK: ret1
     13 ; CHECK: and r0, r0, #1
     14 ; CHECK: bx lr
     15   ret i1 %a
     16 }
     17 
     18 define signext i8 @ret2(i8 signext %a) nounwind uwtable ssp {
     19 entry:
     20 ; CHECK: ret2
     21 ; CHECK: sxtb r0, r0
     22 ; CHECK: bx lr
     23   ret i8 %a
     24 }
     25 
     26 define zeroext i8 @ret3(i8 signext %a) nounwind uwtable ssp {
     27 entry:
     28 ; CHECK: ret3
     29 ; CHECK: uxtb r0, r0
     30 ; CHECK: bx lr
     31   ret i8 %a
     32 }
     33 
     34 define signext i16 @ret4(i16 signext %a) nounwind uwtable ssp {
     35 entry:
     36 ; CHECK: ret4
     37 ; CHECK: sxth r0, r0
     38 ; CHECK: bx lr
     39   ret i16 %a
     40 }
     41 
     42 define zeroext i16 @ret5(i16 signext %a) nounwind uwtable ssp {
     43 entry:
     44 ; CHECK: ret5
     45 ; CHECK: uxth r0, r0
     46 ; CHECK: bx lr
     47   ret i16 %a
     48 }
     49 
     50 define i16 @ret6(i16 %a) nounwind uwtable ssp {
     51 entry:
     52 ; CHECK: ret6
     53 ; CHECK-NOT: uxth
     54 ; CHECK-NOT: sxth
     55 ; CHECK: bx lr
     56   ret i16 %a
     57 }
     58