94 lines · plain
1; 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=ARM2; 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=ARM3; 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=ARM4; 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=THUMB5; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios < %s | FileCheck %s --check-prefix=MOVT6; rdar://104125927 8define void @t1() nounwind {9entry:10; CHECK-LABEL: t111; CHECK: mvn r0, #012 call void @foo(i32 -1)13 ret void14}15 16declare void @foo(i32)17 18define void @t2() nounwind {19entry:20; CHECK-LABEL: t221; CHECK: mvn r0, #23322 call void @foo(i32 -234)23 ret void24}25 26define void @t3() nounwind {27entry:28; CHECK-LABEL: t329; CHECK: mvn r0, #25630 call void @foo(i32 -257)31 ret void32}33 34; Load from constant pool35define void @t4() nounwind {36entry:37; ARM-LABEL: t438; ARM: ldr r039; THUMB-LABEL: t440; THUMB: movw r0, #6527841; THUMB: movt r0, #6553542 call void @foo(i32 -258)43 ret void44}45 46define void @t5() nounwind {47entry:48; CHECK-LABEL: t549; CHECK: mvn r0, #6528050 call void @foo(i32 -65281)51 ret void52}53 54define void @t6() nounwind {55entry:56; CHECK-LABEL: t657; CHECK: mvn r0, #97894458 call void @foo(i32 -978945)59 ret void60}61 62define void @t7() nounwind {63entry:64; CHECK-LABEL: t765; CHECK: mvn r0, #26738688066 call void @foo(i32 -267386881)67 ret void68}69 70define void @t8() nounwind {71entry:72; CHECK-LABEL: t873; CHECK: mvn r0, #6528074 call void @foo(i32 -65281)75 ret void76}77 78define void @t9() nounwind {79entry:80; CHECK-LABEL: t981; CHECK: mvn r0, #213070643282 call void @foo(i32 -2130706433)83 ret void84}85 86; Load from constant pool.87define i32 @t10(i32 %a) {88; MOVT-LABEL: t1089; MOVT: ldr90 %1 = xor i32 -1998730207, %a91 ret i32 %192}93 94