[llvm] 2a3f502 - Added test case for the patch D75866 "supporting the visibility attribute for aix assembly"
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 13:30:14 PDT 2020
Author: diggerlin
Date: 2020-06-09T16:29:28-04:00
New Revision: 2a3f5021f5db56c0190e255fbde3fe619fa9e395
URL: https://github.com/llvm/llvm-project/commit/2a3f5021f5db56c0190e255fbde3fe619fa9e395
DIFF: https://github.com/llvm/llvm-project/commit/2a3f5021f5db56c0190e255fbde3fe619fa9e395.diff
LOG: Added test case for the patch D75866 "supporting the visibility attribute for aix assembly"
The test case has been reviewed in the patch D75866
Reviewers: Jason Liu ,hubert.reinterpretcast,James Henderson
Differential Revision: https://reviews.llvm.org/D75866
Added:
llvm/test/CodeGen/PowerPC/aix-xcoff-visibility.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-visibility.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-visibility.ll
new file mode 100644
index 000000000000..a4c0b93a13a4
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-visibility.ll
@@ -0,0 +1,57 @@
+; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 -mattr=-altivec < %s | \
+; RUN: FileCheck %s
+; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 -mattr=-altivec < %s |\
+; RUN: FileCheck %s
+
+ at b = global i32 0, align 4
+ at b_h = hidden global i32 0, align 4
+
+define void @foo() {
+entry:
+ ret void
+}
+
+define hidden void @foo_h(i32* %ip) {
+entry:
+ ret void
+}
+
+define protected void @foo_protected(i32* %ip) {
+entry:
+ ret void
+}
+
+define weak hidden void @foo_weak_h() {
+entry:
+ ret void
+}
+
+ at foo_p = global void ()* @zoo_weak_extern_h, align 4
+declare extern_weak hidden void @zoo_weak_extern_h()
+
+define i32 @main() {
+entry:
+ %call1= call i32 @bar_h(i32* @b_h)
+ call void @foo_weak_h()
+ %0 = load void ()*, void ()** @foo_p, align 4
+ call void %0()
+ ret i32 0
+}
+
+declare hidden i32 @bar_h(i32*)
+
+; CHECK: .globl foo[DS]{{[[:space:]]*([#].*)?$}}
+; CHECK: .globl .foo{{[[:space:]]*([#].*)?$}}
+; CHECK: .globl foo_h[DS],hidden
+; CHECK: .globl .foo_h,hidden
+; CHECK: .globl foo_protected[DS],protected
+; CHECK: .globl .foo_protected,protected
+; CHECK: .weak foo_weak_h[DS],hidden
+; CHECK: .weak .foo_weak_h,hidden
+
+; CHECK: .globl b{{[[:space:]]*([#].*)?$}}
+; CHECK: .globl b_h,hidden
+
+; CHECK: .weak zoo_weak_extern_h[DS],hidden
+; CHECK: .extern .bar_h,hidden
+; CHECK: .extern bar_h[DS],hidden
More information about the llvm-commits
mailing list