1*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mattr=+no-movt -mtriple=armv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM 2*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mattr=+no-movt -mtriple=armv7-linux-gnueabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM 3*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mattr=+no-movt -mtriple=thumbv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM 4*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB 5*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios < %s | FileCheck %s --check-prefix=MOVT 6*9880d681SAndroid Build Coastguard Worker; rdar://10412592 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Workerdefine void @t1() nounwind { 9*9880d681SAndroid Build Coastguard Workerentry: 10*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t1 11*9880d681SAndroid Build Coastguard Worker; CHECK: mvn r0, #0 12*9880d681SAndroid Build Coastguard Worker call void @foo(i32 -1) 13*9880d681SAndroid Build Coastguard Worker ret void 14*9880d681SAndroid Build Coastguard Worker} 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Workerdeclare void @foo(i32) 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Workerdefine void @t2() nounwind { 19*9880d681SAndroid Build Coastguard Workerentry: 20*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t2 21*9880d681SAndroid Build Coastguard Worker; CHECK: mvn r0, #233 22*9880d681SAndroid Build Coastguard Worker call void @foo(i32 -234) 23*9880d681SAndroid Build Coastguard Worker ret void 24*9880d681SAndroid Build Coastguard Worker} 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Workerdefine void @t3() nounwind { 27*9880d681SAndroid Build Coastguard Workerentry: 28*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t3 29*9880d681SAndroid Build Coastguard Worker; CHECK: mvn r0, #256 30*9880d681SAndroid Build Coastguard Worker call void @foo(i32 -257) 31*9880d681SAndroid Build Coastguard Worker ret void 32*9880d681SAndroid Build Coastguard Worker} 33*9880d681SAndroid Build Coastguard Worker 34*9880d681SAndroid Build Coastguard Worker; Load from constant pool 35*9880d681SAndroid Build Coastguard Workerdefine void @t4() nounwind { 36*9880d681SAndroid Build Coastguard Workerentry: 37*9880d681SAndroid Build Coastguard Worker; ARM-LABEL: t4 38*9880d681SAndroid Build Coastguard Worker; ARM: ldr r0 39*9880d681SAndroid Build Coastguard Worker; THUMB-LABEL: t4 40*9880d681SAndroid Build Coastguard Worker; THUMB: movw r0, #65278 41*9880d681SAndroid Build Coastguard Worker; THUMB: movt r0, #65535 42*9880d681SAndroid Build Coastguard Worker call void @foo(i32 -258) 43*9880d681SAndroid Build Coastguard Worker ret void 44*9880d681SAndroid Build Coastguard Worker} 45*9880d681SAndroid Build Coastguard Worker 46*9880d681SAndroid Build Coastguard Workerdefine void @t5() nounwind { 47*9880d681SAndroid Build Coastguard Workerentry: 48*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t5 49*9880d681SAndroid Build Coastguard Worker; CHECK: mvn r0, #65280 50*9880d681SAndroid Build Coastguard Worker call void @foo(i32 -65281) 51*9880d681SAndroid Build Coastguard Worker ret void 52*9880d681SAndroid Build Coastguard Worker} 53*9880d681SAndroid Build Coastguard Worker 54*9880d681SAndroid Build Coastguard Workerdefine void @t6() nounwind { 55*9880d681SAndroid Build Coastguard Workerentry: 56*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t6 57*9880d681SAndroid Build Coastguard Worker; CHECK: mvn r0, #978944 58*9880d681SAndroid Build Coastguard Worker call void @foo(i32 -978945) 59*9880d681SAndroid Build Coastguard Worker ret void 60*9880d681SAndroid Build Coastguard Worker} 61*9880d681SAndroid Build Coastguard Worker 62*9880d681SAndroid Build Coastguard Workerdefine void @t7() nounwind { 63*9880d681SAndroid Build Coastguard Workerentry: 64*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t7 65*9880d681SAndroid Build Coastguard Worker; CHECK: mvn r0, #267386880 66*9880d681SAndroid Build Coastguard Worker call void @foo(i32 -267386881) 67*9880d681SAndroid Build Coastguard Worker ret void 68*9880d681SAndroid Build Coastguard Worker} 69*9880d681SAndroid Build Coastguard Worker 70*9880d681SAndroid Build Coastguard Workerdefine void @t8() nounwind { 71*9880d681SAndroid Build Coastguard Workerentry: 72*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t8 73*9880d681SAndroid Build Coastguard Worker; CHECK: mvn r0, #65280 74*9880d681SAndroid Build Coastguard Worker call void @foo(i32 -65281) 75*9880d681SAndroid Build Coastguard Worker ret void 76*9880d681SAndroid Build Coastguard Worker} 77*9880d681SAndroid Build Coastguard Worker 78*9880d681SAndroid Build Coastguard Workerdefine void @t9() nounwind { 79*9880d681SAndroid Build Coastguard Workerentry: 80*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t9 81*9880d681SAndroid Build Coastguard Worker; CHECK: mvn r0, #2130706432 82*9880d681SAndroid Build Coastguard Worker call void @foo(i32 -2130706433) 83*9880d681SAndroid Build Coastguard Worker ret void 84*9880d681SAndroid Build Coastguard Worker} 85*9880d681SAndroid Build Coastguard Worker 86*9880d681SAndroid Build Coastguard Worker; Load from constant pool. 87*9880d681SAndroid Build Coastguard Workerdefine i32 @t10(i32 %a) { 88*9880d681SAndroid Build Coastguard Worker; MOVT-LABEL: t10 89*9880d681SAndroid Build Coastguard Worker; MOVT: ldr 90*9880d681SAndroid Build Coastguard Worker %1 = xor i32 -1998730207, %a 91*9880d681SAndroid Build Coastguard Worker ret i32 %1 92*9880d681SAndroid Build Coastguard Worker} 93*9880d681SAndroid Build Coastguard Worker 94