[llvm] r269766 - Add a test showing how hidden stubs are handled on ppc.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue May 17 07:24:33 PDT 2016
Author: rafael
Date: Tue May 17 09:24:33 2016
New Revision: 269766
URL: http://llvm.org/viewvc/llvm-project?rev=269766&view=rev
Log:
Add a test showing how hidden stubs are handled on ppc.
Added:
llvm/trunk/test/CodeGen/PowerPC/indirect-hidden.ll
Added: llvm/trunk/test/CodeGen/PowerPC/indirect-hidden.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/indirect-hidden.ll?rev=269766&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/indirect-hidden.ll (added)
+++ llvm/trunk/test/CodeGen/PowerPC/indirect-hidden.ll Tue May 17 09:24:33 2016
@@ -0,0 +1,23 @@
+; RUN: llc -mtriple=powerpc-apple-darwin < %s | FileCheck %s
+
+ at a = external hidden global i32
+ at b = external global i32
+
+define i32* @get_a() {
+ ret i32* @a
+}
+
+define i32* @get_b() {
+ ret i32* @b
+}
+
+; CHECK: .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
+; CHECK-NEXT: .p2align 2
+; CHECK-NEXT: L_b$non_lazy_ptr:
+; CHECK-NEXT: .indirect_symbol _b
+; CHECK-NEXT: .long 0
+
+; CHECK: .section __DATA,__data
+; CHECK-NEXT: .p2align 2
+; CHECK-NEXT: L_a$non_lazy_ptr:
+; CHECK-NEXT: .long _a
More information about the llvm-commits
mailing list