brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 1ddab47 Raw
98 lines · plain
1; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - | \2; RUN:   FileCheck -check-prefixes=CHECK,NO-OPTION,NO-OPTION-COMMON %s3; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=-no-movt | \4; RUN:   FileCheck -check-prefixes=CHECK,USE-MOVT,USE-MOVT-COMMON %s5; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=+no-movt | \6; RUN:   FileCheck -check-prefixes=CHECK,NO-USE-MOVT,NO-USE-MOVT-COMMON %s7; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 | \8; RUN:   FileCheck -check-prefixes=CHECK,NO-OPTION-O0,NO-OPTION-COMMON %s9; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=-no-movt | \10; RUN:  FileCheck -check-prefixes=CHECK,USE-MOVT-O0,USE-MOVT-COMMON %s11; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=+no-movt | \12; RUN:   FileCheck -check-prefixes=CHECK,NO-USE-MOVT-O0,NO-USE-MOVT-COMMON %s13 14target triple = "thumb-apple-darwin"15 16; NO-OPTION-COMMON-LABEL: {{_?}}foo017; NO-OPTION-COMMON: ldr [[R0:r[0-9]+]], [[L0:.*]]18; NO-OPTION-COMMON: [[L0]]:19; NO-OPTION-COMMON: .long 229623708920 21; USE-MOVT-COMMON-LABEL: {{_?}}foo022; USE-MOVT-COMMON: movw [[R0:r[0-9]+]], #5225723; USE-MOVT-COMMON: movt [[R0]], #3503724 25; NO-USE-MOVT-COMMON-LABEL: {{_?}}foo026; NO-USE-MOVT-COMMON: ldr [[R0:r[0-9]+]], [[L0:.*]]27; NO-USE-MOVT-COMMON: [[L0]]:28; NO-USE-MOVT-COMMON: .long 229623708929 30define i32 @foo0(i32 %a) #0 {31  %1 = xor i32 -1998730207, %a32  ret i32 %133}34 35; NO-OPTION-COMMON-LABEL: {{_?}}foo136; NO-OPTION-COMMON: movw [[R0:r[0-9]+]], #5225737; NO-OPTION-COMMON: movt [[R0]], #3503738 39; USE-MOVT-COMMON-LABEL: {{_?}}foo140; USE-MOVT-COMMON: movw [[R0:r[0-9]+]], #5225741; USE-MOVT-COMMON: movt [[R0]], #3503742 43; NO-USE-MOVT-COMMON-LABEL: {{_?}}foo144; NO-USE-MOVT-COMMON: ldr [[R0:r[0-9]+]], [[L0:.*]]45; NO-USE-MOVT-COMMON: [[L0]]:46; NO-USE-MOVT-COMMON: .long 229623708947 48define i32 @foo1(i32 %a) {49  %1 = xor i32 -1998730207, %a50  ret i32 %151}52 53; NO-OPTION-COMMON-LABEL: {{_?}}foo254; NO-OPTION:   mov.w	[[R0:r[0-9]+]], #-53681356855; NO-OPTION-O0: movw	[[R0:r[0-9]+]], #5734456; NO-OPTION-O0: movt	[[R0]], #5734457 58; USE-MOVT-COMMON-LABEL: {{_?}}foo259; USE-MOVT:     mov.w [[R0:r[0-9]+]], #-53681356860; USE-MOVT-O0:  movw  [[R0:r[0-9]+]], #5734461; USE-MOVT-O0:  movt  [[R0]], #5734462 63; NO-USE-MOVT-COMMON-LABEL: {{_?}}foo264; NO-USE-MOVT: mov.w	[[R0:r[0-9]+]], #-53681356865; NO-USE-MOVT-O0: ldr [[R0:r[0-9]+]], [[L0:.*]]66; NO-USE-MOVT-O0: [[L0]]:67; NO-USE-MOVT-O0: .long 3758153728     @ 0xe000e00068 69define i32 @foo2() {70  %1 = load i32, ptr inttoptr (i32 -536813568 to ptr) ; load from 0xe000e00071  ret i32 %172}73attributes #0 = { "target-features"="+no-movt" }74 75define hidden i32 @no_litpool() minsize optsize {76; CHECK-LABEL:  no_litpool:77; CHECK:        mov.w r{{.}}, #6553678; CHECK:        mov.w r{{.}}, #-13421772879; CHECK:        mvn r{{.}}, #-13421772880entry:81  %call0 = tail call i32 @eat_const(i32 65536)82  %call1 = tail call i32 @eat_const(i32 -134217728)83  %call2 = tail call i32 @eat_const(i32 134217727)84  ret i32 %call285}86 87define hidden i32 @litpool() minsize optsize {88; CHECK-LABEL:  litpool:89; CHECK:        ldr r0, {{.*}}LCPI{{.*}}90; CHECK-NEXT:   b.w {{.*}}eat_const91entry:92  %call1 = tail call i32 @eat_const(i32 8388601)93  ret i32 %call194}95 96declare dso_local i32 @eat_const(i32)97 98