File: aix-ignore-xcoff-visibility.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (48 lines) | stat: -rw-r--r-- 1,746 bytes parent folder | download | duplicates (7)
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
; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \
; RUN:     -mattr=-altivec -data-sections=false < %s | \
; RUN:   FileCheck --check-prefix=VISIBILITY-ASM %s
; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \
; RUN:     -mattr=-altivec -data-sections=false -ignore-xcoff-visibility < %s | \
; RUN:   FileCheck --check-prefix=IGNOREVISIBILITY-ASM %s
; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \
; RUN:     -mattr=-altivec -data-sections=false < %s | \
; RUN:   FileCheck --check-prefix=VISIBILITY-ASM %s
; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \
; RUN:     -mattr=-altivec -data-sections=false -ignore-xcoff-visibility < %s | \
; RUN:   FileCheck --check-prefix=IGNOREVISIBILITY-ASM %s

@foo_p = global void ()* @zoo_extern_h, align 4
@b = protected global i32 0, align 4

define hidden void @foo_h(i32* %p) {
entry:
  %p.addr = alloca i32*, align 4
  store i32* %p, i32** %p.addr, align 4
  %0 = load i32*, i32** %p.addr, align 4
  %1 = load i32, i32* %0, align 4
  %inc = add nsw i32 %1, 1
  store i32 %inc, i32* %0, align 4
  ret void
}

declare hidden void @zoo_extern_h()

define protected void @bar() {
entry:
  call void @foo_h(i32* @b)
  %0 = load void ()*, void ()** @foo_p, align 4
  call void %0()
  ret void
}

; VISIBILITY-ASM: .globl  foo_h[DS],hidden
; VISIBILITY-ASM: .globl  .foo_h,hidden
; VISIBILITY-ASM: .globl  bar[DS],protected
; VISIBILITY-ASM: .globl  .bar,protected
; VISIBILITY-ASM: .globl  b,protected

; IGNOREVISIBILITY-ASM: .globl  foo_h[DS]
; IGNOREVISIBILITY-ASM: .globl  .foo_h
; IGNOREVISIBILITY-ASM: .globl  bar[DS]
; IGNOREVISIBILITY-ASM: .globl  .bar
; IGNOREVISIBILITY-ASM: .globl  b