llvm.org GIT mirror llvm / 2a8dc35
[NVPTX] Emit .weak linkage for link_once, weak, available_externally, and common linkage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211941 91177308-0d34-0410-b5e6-96231b3b80d8 Justin Holewinski 6 years ago
2 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
13661366 O << ".visible ";
13671367 else
13681368 O << ".extern ";
1369 } else if (GVar->hasLinkOnceLinkage() || GVar->hasWeakLinkage() ||
1370 GVar->hasAvailableExternallyLinkage() ||
1371 GVar->hasCommonLinkage()) {
1372 O << ".weak ";
13691373 }
13701374
13711375 if (llvm::isTexture(*GVar)) {
0 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
1
2 ; CHECK: .weak .global .align 4 .u32 g
3 @g = common addrspace(1) global i32 zeroinitializer
4
5 define i32 @func0() {
6 %val = load i32 addrspace(1)* @g
7 ret i32 %val
8 }