1 ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \
2 ; RUN: -data-sections=false < %s | FileCheck --check-prefix=ASM %s
4 ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \
5 ; RUN: -data-sections=false -filetype=obj -o %t.o < %s
6 ; RUN: llvm-objdump --syms %t.o | FileCheck --check-prefix=SYM %s
8 @ConstVector = global <2 x i64> <i64 12, i64 34>, align 4
9 @var1 = alias i64, getelementptr inbounds (<2 x i64>, <2 x i64>* @ConstVector, i32 0, i32 1)
10 define void @foo1(i64 %a1) {
11 store i64 %a1, i64* getelementptr inbounds (<2 x i64>, <2 x i64>* @ConstVector, i32 0, i32 1), align 4
15 ; ASM: .globl ConstVector # @ConstVector
16 ; ASM-NEXT: .globl var1
18 ; ASM-NEXT: ConstVector:
19 ; ASM-NEXT: .vbyte 4, 0 # 0xc
20 ; ASM-NEXT: .vbyte 4, 12
22 ; ASM-NEXT: .vbyte 4, 0 # 0x22
23 ; ASM-NEXT: .vbyte 4, 34
25 @ConstDataSeq = global [2 x i64] [i64 12, i64 34], align 4
26 @var2 = alias i64, getelementptr inbounds ([2 x i64], [2 x i64]* @ConstDataSeq, i32 0, i32 1)
27 define void @foo2(i64 %a1) {
28 store i64 %a1, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @ConstDataSeq, i32 0, i32 1), align 4
32 ; ASM: .globl ConstDataSeq # @ConstDataSeq
33 ; ASM-NEXT: .globl var2
35 ; ASM-NEXT: ConstDataSeq:
36 ; ASM-NEXT: .vbyte 4, 0 # 0xc
37 ; ASM-NEXT: .vbyte 4, 12
39 ; ASM-NEXT: .vbyte 4, 0 # 0x22
40 ; ASM-NEXT: .vbyte 4, 34
42 %struct.B = type { i64 }
43 @ConstArray = global [2 x %struct.B] [%struct.B {i64 12}, %struct.B {i64 34}], align 4
44 @var3 = alias %struct.B, getelementptr inbounds ([2 x %struct.B], [2 x %struct.B]* @ConstArray, i32 0, i32 0)
45 define void @foo3(%struct.B %a1) {
46 store %struct.B %a1, %struct.B* getelementptr inbounds ([2 x %struct.B], [2 x %struct.B]* @ConstArray, i32 0, i32 1), align 4
50 ; ASM: .globl ConstArray # @ConstArray
51 ; ASM-NEXT: .globl var3
53 ; ASM-NEXT: ConstArray:
55 ; ASM-NEXT: .vbyte 4, 0 # 0xc
56 ; ASM-NEXT: .vbyte 4, 12
57 ; ASM-NEXT: .vbyte 4, 0 # 0x22
58 ; ASM-NEXT: .vbyte 4, 34
61 ; SYM-NEXT: 00000000 df *DEBUG* 00000000 <stdin>
62 ; SYM-NEXT: 00000000 l .text 0000008a
63 ; SYM-NEXT: 00000000 g F .text (csect: ) 00000000 .foo1
64 ; SYM-NEXT: 00000030 g F .text (csect: ) 00000000 .foo2
65 ; SYM-NEXT: 00000060 g F .text (csect: ) 00000000 .foo3
66 ; SYM-NEXT: 00000090 l .data 00000030 .data
67 ; SYM-NEXT: 00000090 g O .data (csect: .data) 00000000 ConstVector
68 ; SYM-NEXT: 00000098 g O .data (csect: .data) 00000000 var1
69 ; SYM-NEXT: 000000a0 g O .data (csect: .data) 00000000 ConstDataSeq
70 ; SYM-NEXT: 000000a8 g O .data (csect: .data) 00000000 var2
71 ; SYM-NEXT: 000000b0 g O .data (csect: .data) 00000000 ConstArray
72 ; SYM-NEXT: 000000b0 g O .data (csect: .data) 00000000 var3
73 ; SYM-NEXT: 000000c0 g O .data 0000000c foo1
74 ; SYM-NEXT: 000000cc g O .data 0000000c foo2
75 ; SYM-NEXT: 000000d8 g O .data 0000000c foo3
76 ; SYM-NEXT: 000000e4 l .data 00000000 TOC
77 ; SYM-NEXT: 000000e4 l O .data 00000004 ConstVector
78 ; SYM-NEXT: 000000e8 l O .data 00000004 ConstDataSeq
79 ; SYM-NEXT: 000000ec l O .data 00000004 ConstArray