Index: llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp =================================================================== --- llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp +++ llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp @@ -40,7 +40,6 @@ HasAggressiveSymbolFolding = true; COMMDirectiveAlignmentIsInBytes = false; HasNoDeadStrip = true; - WeakRefDirective = ".weakref\t"; //===--- Dwarf Emission Directives -----------------------------------===// SupportsDebugInformation = true; DwarfRegNumForCFI = true; Index: llvm/test/CodeGen/AMDGPU/hsa-globals.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/hsa-globals.ll +++ llvm/test/CodeGen/AMDGPU/hsa-globals.ll @@ -13,6 +13,8 @@ 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 @@ ; ASM: external_readonly: ; ASM: .long 0 ; ASM: .size external_readonly, 4 + +; ASM: .weak weak_global