Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / test / CodeGen / PowerPC / aix-overflow-toc-data.py
blob276c6da3feae2484c7f2c78bbd9a0de57c3628c6
1 # UNSUPPORTED: expensive_checks, debug
3 # RUN: %python %s > %t.ll
4 # RUN: llc -mtriple powerpc-ibm-aix-xcoff -code-model=small -mcpu=pwr7 -mattr=-altivec -O0 < %t.ll | \
5 # RUN: FileCheck --check-prefix=ASM32 %s
7 # RUN: llc -mtriple powerpc64-ibm-aix-xcoff -code-model=small -mcpu=pwr7 -mattr=-altivec -O0 < %t.ll | \
8 # RUN: FileCheck --check-prefix=ASM64 %s
10 # RUN: llc -mtriple powerpc-ibm-aix-xcoff -code-model=small -mcpu=pwr7 -mattr=-altivec -O0 \
11 # RUN: -filetype=obj -o %t.o < %t.ll
12 # RUN: llvm-objdump --no-print-imm-hex -D -r --symbol-description %t.o | FileCheck -D#NFA=2 --check-prefix=DIS32 %s
14 # RUN: llc -mtriple powerpc64-ibm-aix-xcoff -code-model=small -mcpu=pwr7 -mattr=-altivec -O0 \
15 # RUN: -filetype=obj -o %t.o < %t.ll
16 # RUN: llvm-objdump --no-print-imm-hex -D -r --symbol-description %t.o | FileCheck -D#NFA=2 --check-prefix=DIS64 %s
18 numentries = 8195
19 for x in range(0, numentries):
20 print("@a%d = global i32 0, align 4 #0" % (x))
22 print("define void @foo() {")
23 print("entry:")
24 for x in range(0, numentries):
25 print("store i32 1, i32* @a%d, align 4" % (x))
26 print("ret void")
27 print("}")
29 print('attributes #0 = { "toc-data" }')
31 # 32-bit assembly check
32 # ASM32: la 4, a0[TD](2)
33 # ASM32: la 4, a1[TD](2)
35 # ASM32: la 4, a8191[TD](2)
36 # ASM32: la 4, a8192[TD](2)
37 # ASM32: la 4, a8193[TD](2)
39 # 64-bit assembly check
40 # ASM64: la 4, a0[TD](2)
41 # ASM64: la 4, a1[TD](2)
43 # ASM64: la 4, a8191[TD](2)
44 # ASM64: la 4, a8192[TD](2)
45 # ASM64: la 4, a8193[TD](2)
47 # DIS32: fffc: 38 82 7f fc addi 4, 2, 32764
48 # DIS32: 0000fffe: R_TOC (idx: [[#NFA+16391]]) a8191[TD]
49 # DIS32: 10004: 38 82 80 00 addi 4, 2, -32768
50 # DIS32: 00010006: R_TOC (idx: [[#NFA+16393]]) a8192[TD]
51 # DIS32: 1000c: 38 82 80 04 addi 4, 2, -32764
52 # DIS32: 0001000e: R_TOC (idx: [[#NFA+16395]]) a8193[TD]
54 # DIS64: fffc: 38 82 7f fc addi 4, 2, 32764
55 # DIS64: 0000fffe: R_TOC (idx: [[#NFA+16391]]) a8191[TD]
56 # DIS64: 10004: 38 82 80 00 addi 4, 2, -32768
57 # DIS64: 00010006: R_TOC (idx: [[#NFA+16393]]) a8192[TD]
58 # DIS64: 1000c: 38 82 80 04 addi 4, 2, -32764
59 # DIS64: 0001000e: R_TOC (idx: [[#NFA+16395]]) a8193[TD]