1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/CodeGen/PowerPC/aix-ignore-xcoff-visibility.ll
jasonliu d77cbcb130 [AIX] Turn -fdata-sections on by default in Clang
Summary:

This patch does the following:
1. Make InitTargetOptionsFromCodeGenFlags() accepts Triple as a
 parameter, because some options' default value is triple dependant.
2. DataSections is turned on by default on AIX for llc.
3. Test cases change accordingly because of the default behaviour change.
4. Clang Driver passes in -fdata-sections by default on AIX.

Reviewed By: MaskRay, DiggerLin

Differential Revision: https://reviews.llvm.org/D88737
2020-10-14 15:58:31 +00:00

49 lines
1.7 KiB
LLVM

; 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