diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp index 687cfef4559f..1836237c8df5 100644 --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp @@ -40,7 +40,6 @@ AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(const Triple &TT, HasAggressiveSymbolFolding = true; COMMDirectiveAlignmentIsInBytes = false; HasNoDeadStrip = true; - WeakRefDirective = ".weakref\t"; //===--- Dwarf Emission Directives -----------------------------------===// SupportsDebugInformation = true; DwarfRegNumForCFI = true; diff --git a/llvm/test/CodeGen/AMDGPU/hsa-globals.ll b/llvm/test/CodeGen/AMDGPU/hsa-globals.ll index 09c4b5f68a0b..bbb96072dfaf 100644 --- a/llvm/test/CodeGen/AMDGPU/hsa-globals.ll +++ b/llvm/test/CodeGen/AMDGPU/hsa-globals.ll @@ -13,6 +13,8 @@ define amdgpu_kernel void @test() { ret void } +@weak_global = extern_weak addrspace(1) global i32 + ; ASM: .type linkonce_odr_global_program,@object ; ASM: .section .bss,#alloc,#write ; ASM: .weak linkonce_odr_global_program @@ -48,3 +50,5 @@ define amdgpu_kernel void @test() { ; ASM: external_readonly: ; ASM: .long 0 ; ASM: .size external_readonly, 4 + +; ASM: .weak weak_global