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 --check-prefix=ARM
      2 ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
      3 ; rdar://10412592
      4 
      5 ; Note: The Thumb code is being generated by the target-independent selector.
      6 
      7 define void @t1() nounwind {
      8 entry:
      9 ; ARM: t1
     10 ; THUMB: t1
     11 ; ARM: mvn r0, #0
     12 ; THUMB: movw r0, #65535
     13 ; THUMB: movt r0, #65535
     14   call void @foo(i32 -1)
     15   ret void
     16 }
     17 
     18 declare void @foo(i32)
     19 
     20 define void @t2() nounwind {
     21 entry:
     22 ; ARM: t2
     23 ; THUMB: t2
     24 ; ARM: mvn r0, #233
     25 ; THUMB: movw r0, #65302
     26 ; THUMB: movt r0, #65535
     27   call void @foo(i32 -234)
     28   ret void
     29 }
     30 
     31 define void @t3() nounwind {
     32 entry:
     33 ; ARM: t3
     34 ; THUMB: t3
     35 ; ARM: mvn	r0, #256
     36 ; THUMB: movw r0, #65279
     37 ; THUMB: movt r0, #65535
     38   call void @foo(i32 -257)
     39   ret void
     40 }
     41 
     42 ; Load from constant pool
     43 define void @t4() nounwind {
     44 entry:
     45 ; ARM: t4
     46 ; THUMB: t4
     47 ; ARM: ldr	r0
     48 ; THUMB: movw r0, #65278
     49 ; THUMB: movt r0, #65535
     50   call void @foo(i32 -258)
     51   ret void
     52 }
     53 
     54 define void @t5() nounwind {
     55 entry:
     56 ; ARM: t5
     57 ; THUMB: t5
     58 ; ARM: mvn r0, #65280
     59 ; THUMB: movs r0, #255
     60 ; THUMB: movt r0, #65535
     61   call void @foo(i32 -65281)
     62   ret void
     63 }
     64 
     65 define void @t6() nounwind {
     66 entry:
     67 ; ARM: t6
     68 ; THUMB: t6
     69 ; ARM: mvn r0, #978944
     70 ; THUMB: movw r0, #4095
     71 ; THUMB: movt r0, #65521
     72   call void @foo(i32 -978945)
     73   ret void
     74 }
     75 
     76 define void @t7() nounwind {
     77 entry:
     78 ; ARM: t7
     79 ; THUMB: t7
     80 ; ARM: mvn r0, #267386880
     81 ; THUMB: movw r0, #65535
     82 ; THUMB: movt r0, #61455
     83   call void @foo(i32 -267386881)
     84   ret void
     85 }
     86 
     87 define void @t8() nounwind {
     88 entry:
     89 ; ARM: t8
     90 ; THUMB: t8
     91 ; ARM: mvn r0, #65280
     92 ; THUMB: movs r0, #255
     93 ; THUMB: movt r0, #65535
     94   call void @foo(i32 -65281)
     95   ret void
     96 }
     97 
     98 define void @t9() nounwind {
     99 entry:
    100 ; ARM: t9
    101 ; THUMB: t9
    102 ; ARM: mvn r0, #2130706432
    103 ; THUMB: movw r0, #65535
    104 ; THUMB: movt r0, #33023
    105   call void @foo(i32 -2130706433)
    106   ret void
    107 }
    108