1 ; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -arm-use-movt=false -mtriple=armv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM
2 ; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -arm-use-movt=false -mtriple=armv7-linux-gnueabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM
3 ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
4 ; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -arm-use-movt=true -mtriple=armv7-apple-ios < %s | FileCheck %s --check-prefix=MOVT
7 ; Note: The Thumb code is being generated by the target-independent selector.
9 define void @t1() nounwind {
14 ; THUMB: movw r0, #65535
15 ; THUMB: movt r0, #65535
16 call void @foo(i32 -1)
20 declare void @foo(i32)
22 define void @t2() nounwind {
27 ; THUMB: movw r0, #65302
28 ; THUMB: movt r0, #65535
29 call void @foo(i32 -234)
33 define void @t3() nounwind {
38 ; THUMB: movw r0, #65279
39 ; THUMB: movt r0, #65535
40 call void @foo(i32 -257)
44 ; Load from constant pool
45 define void @t4() nounwind {
50 ; THUMB: movw r0, #65278
51 ; THUMB: movt r0, #65535
52 call void @foo(i32 -258)
56 define void @t5() nounwind {
61 ; THUMB: movs r0, #255
62 ; THUMB: movt r0, #65535
63 call void @foo(i32 -65281)
67 define void @t6() nounwind {
71 ; ARM: mvn r0, #978944
72 ; THUMB: movw r0, #4095
73 ; THUMB: movt r0, #65521
74 call void @foo(i32 -978945)
78 define void @t7() nounwind {
82 ; ARM: mvn r0, #267386880
83 ; THUMB: movw r0, #65535
84 ; THUMB: movt r0, #61455
85 call void @foo(i32 -267386881)
89 define void @t8() nounwind {
94 ; THUMB: movs r0, #255
95 ; THUMB: movt r0, #65535
96 call void @foo(i32 -65281)
100 define void @t9() nounwind {
104 ; ARM: mvn r0, #2130706432
105 ; THUMB: movw r0, #65535
106 ; THUMB: movt r0, #33023
107 call void @foo(i32 -2130706433)
111 ; Load from constant pool.
112 define i32 @t10(i32 %a) {
115 %1 = xor i32 -1998730207, %a