File: aix-alias-alignment-2.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (79 lines) | stat: -rw-r--r-- 3,485 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \
; RUN:     -data-sections=false < %s | FileCheck --check-prefix=ASM %s

; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \
; RUN:     -data-sections=false -filetype=obj -o %t.o < %s
; RUN: llvm-objdump --syms %t.o | FileCheck --check-prefix=SYM %s

@ConstVector = global <2 x i64> <i64 12, i64 34>, align 4
@var1 = alias i64, getelementptr inbounds (<2 x i64>, <2 x i64>* @ConstVector, i32 0, i32 1)
define void @foo1(i64 %a1) {
  store i64 %a1, i64* getelementptr inbounds (<2 x i64>, <2 x i64>* @ConstVector, i32 0, i32 1), align 4
  ret void
}

; ASM:           .globl     ConstVector  # @ConstVector
; ASM-NEXT:      .globl     var1
; ASM-NEXT:      .align     4
; ASM-NEXT: ConstVector:
; ASM-NEXT:      .vbyte     4, 0         # 0xc
; ASM-NEXT:      .vbyte     4, 12
; ASM-NEXT: var1:
; ASM-NEXT:      .vbyte     4, 0         # 0x22
; ASM-NEXT:      .vbyte     4, 34

@ConstDataSeq = global [2 x i64] [i64 12, i64 34], align 4
@var2 = alias i64, getelementptr inbounds ([2 x i64], [2 x i64]* @ConstDataSeq, i32 0, i32 1)
define void @foo2(i64 %a1) {
  store i64 %a1, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @ConstDataSeq, i32 0, i32 1), align 4
  ret void
}

; ASM:           .globl     ConstDataSeq   # @ConstDataSeq
; ASM-NEXT:      .globl     var2
; ASM-NEXT:      .align     3
; ASM-NEXT: ConstDataSeq:
; ASM-NEXT:      .vbyte     4, 0           # 0xc
; ASM-NEXT:      .vbyte     4, 12
; ASM-NEXT: var2:
; ASM-NEXT:      .vbyte     4, 0           # 0x22
; ASM-NEXT:      .vbyte     4, 34

%struct.B = type { i64 }
@ConstArray = global [2 x %struct.B] [%struct.B {i64 12}, %struct.B {i64 34}], align 4
@var3 = alias %struct.B, getelementptr inbounds ([2 x %struct.B], [2 x %struct.B]* @ConstArray, i32 0, i32 0)
define void @foo3(%struct.B %a1) {
  store %struct.B %a1, %struct.B* getelementptr inbounds ([2 x %struct.B], [2 x %struct.B]* @ConstArray, i32 0, i32 1), align 4
  ret void
}

; ASM:           .globl     ConstArray  # @ConstArray
; ASM-NEXT:      .globl     var3
; ASM-NEXT:      .align     3
; ASM-NEXT: ConstArray:
; ASM-NEXT: var3:
; ASM-NEXT:      .vbyte     4, 0        # 0xc
; ASM-NEXT:      .vbyte     4, 12
; ASM-NEXT:      .vbyte     4, 0        # 0x22
; ASM-NEXT:      .vbyte     4, 34

; SYM:      SYMBOL TABLE:
; SYM-NEXT: 00000000      df *DEBUG*	00000000 <stdin>
; SYM-NEXT: 00000000 l       .text	0000008a .text
; SYM-NEXT: 00000000 g     F .text (csect: .text) 	00000000 .foo1
; SYM-NEXT: 00000030 g     F .text (csect: .text) 	00000000 .foo2
; SYM-NEXT: 00000060 g     F .text (csect: .text) 	00000000 .foo3
; SYM-NEXT: 00000090 l       .data	00000030 .data
; SYM-NEXT: 00000090 g     O .data (csect: .data) 	00000000 ConstVector
; SYM-NEXT: 00000098 g     O .data (csect: .data) 	00000000 var1
; SYM-NEXT: 000000a0 g     O .data (csect: .data) 	00000000 ConstDataSeq
; SYM-NEXT: 000000a8 g     O .data (csect: .data) 	00000000 var2
; SYM-NEXT: 000000b0 g     O .data (csect: .data) 	00000000 ConstArray
; SYM-NEXT: 000000b0 g     O .data (csect: .data) 	00000000 var3
; SYM-NEXT: 000000c0 g     O .data	0000000c foo1
; SYM-NEXT: 000000cc g     O .data	0000000c foo2
; SYM-NEXT: 000000d8 g     O .data	0000000c foo3
; SYM-NEXT: 000000e4 l       .data	00000000 TOC
; SYM-NEXT: 000000e4 l     O .data	00000004 ConstVector
; SYM-NEXT: 000000e8 l     O .data	00000004 ConstDataSeq
; SYM-NEXT: 000000ec l     O .data	00000004 ConstArray