1 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s --check-prefix CHECK
2 ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s --check-prefix CHECK
4 ; RUN: llc -filetype=obj -mtriple powerpc-ibm-aix-xcoff < %s -o %t32.o
5 ; RUN: llvm-readobj %t32.o --syms | FileCheck %s --check-prefix=OBJ32
6 ; RUN: llc -filetype=obj -mtriple powerpc64-ibm-aix-xcoff < %s -o %t64.o
7 ; RUN: llvm-readobj %t64.o --syms | FileCheck %s --check-prefix=OBJ64
9 %struct.small_struct = type { i16 }
11 @a = global %struct.small_struct zeroinitializer, align 2 #0
12 @b = global [2 x i16] zeroinitializer, align 2 #0
14 ; Function Attrs: noinline
15 define i16 @foo() #1 {
17 %0 = load i16, ptr @a, align 2
18 %1 = load i16, ptr @b, align 2
19 %add = add nsw i16 %0, %1
23 attributes #0 = { "toc-data" }
24 attributes #1 = { noinline }
27 ; CHECK-NEXT: .csect a[TD],2
28 ; CHECK-NEXT: .globl a[TD] # @a
29 ; CHECK-NEXT: .align 1
30 ; CHECK-NEXT: .space 2
31 ; CHECK-NEXT: .csect b[TD],2
32 ; CHECK-NEXT: .globl b[TD] # @b
33 ; CHECK-NEXT: .align 1
34 ; CHECK-NEXT: .space 4
38 ; OBJ32-NEXT: Value (RelocatableAddress): 0x3C
39 ; OBJ32-NEXT: Section: .data
40 ; OBJ32-NEXT: Type: 0x0
41 ; OBJ32-NEXT: StorageClass: C_EXT (0x2)
42 ; OBJ32-NEXT: NumberOfAuxEntries: 1
43 ; OBJ32-NEXT: CSECT Auxiliary Entry {
44 ; OBJ32-NEXT: Index: {{[0-9]+}}
45 ; OBJ32-NEXT: SectionLen: 2
46 ; OBJ32-NEXT: ParameterHashIndex: 0x0
47 ; OBJ32-NEXT: TypeChkSectNum: 0x0
48 ; OBJ32-NEXT: SymbolAlignmentLog2: 2
49 ; OBJ32-NEXT: SymbolType: XTY_SD (0x1)
50 ; OBJ32-NEXT: StorageMappingClass: XMC_TD (0x10)
51 ; OBJ32-NEXT: StabInfoIndex: 0x0
52 ; OBJ32-NEXT: StabSectNum: 0x0
55 ; OBJ32-NEXT: Symbol {
57 ; OBJ32-NEXT: Value (RelocatableAddress): 0x40
58 ; OBJ32-NEXT: Section: .data
59 ; OBJ32-NEXT: Type: 0x0
60 ; OBJ32-NEXT: StorageClass: C_EXT (0x2)
61 ; OBJ32-NEXT: NumberOfAuxEntries: 1
62 ; OBJ32-NEXT: CSECT Auxiliary Entry {
63 ; OBJ32-NEXT: Index: {{[0-9]+}}
64 ; OBJ32-NEXT: SectionLen: 4
65 ; OBJ32-NEXT: ParameterHashIndex: 0x0
66 ; OBJ32-NEXT: TypeChkSectNum: 0x0
67 ; OBJ32-NEXT: SymbolAlignmentLog2: 2
68 ; OBJ32-NEXT: SymbolType: XTY_SD (0x1)
69 ; OBJ32-NEXT: StorageMappingClass: XMC_TD (0x10)
70 ; OBJ32-NEXT: StabInfoIndex: 0x0
71 ; OBJ32-NEXT: StabSectNum: 0x0
77 ; OBJ64-NEXT: Value (RelocatableAddress): 0x48
78 ; OBJ64-NEXT: Section: .data
79 ; OBJ64-NEXT: Type: 0x0
80 ; OBJ64-NEXT: StorageClass: C_EXT (0x2)
81 ; OBJ64-NEXT: NumberOfAuxEntries: 1
82 ; OBJ64-NEXT: CSECT Auxiliary Entry {
83 ; OBJ64-NEXT: Index: {{[0-9]+}}
84 ; OBJ64-NEXT: SectionLen: 2
85 ; OBJ64-NEXT: ParameterHashIndex: 0x0
86 ; OBJ64-NEXT: TypeChkSectNum: 0x0
87 ; OBJ64-NEXT: SymbolAlignmentLog2: 2
88 ; OBJ64-NEXT: SymbolType: XTY_SD (0x1)
89 ; OBJ64-NEXT: StorageMappingClass: XMC_TD (0x10)
90 ; OBJ64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)
93 ; OBJ64-NEXT: Symbol {
95 ; OBJ64-NEXT: Value (RelocatableAddress): 0x4C
96 ; OBJ64-NEXT: Section: .data
97 ; OBJ64-NEXT: Type: 0x0
98 ; OBJ64-NEXT: StorageClass: C_EXT (0x2)
99 ; OBJ64-NEXT: NumberOfAuxEntries: 1
100 ; OBJ64-NEXT: CSECT Auxiliary Entry {
101 ; OBJ64-NEXT: Index: {{[0-9]+}}
102 ; OBJ64-NEXT: SectionLen: 4
103 ; OBJ64-NEXT: ParameterHashIndex: 0x0
104 ; OBJ64-NEXT: TypeChkSectNum: 0x0
105 ; OBJ64-NEXT: SymbolAlignmentLog2: 2
106 ; OBJ64-NEXT: SymbolType: XTY_SD (0x1)
107 ; OBJ64-NEXT: StorageMappingClass: XMC_TD (0x10)
108 ; OBJ64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)