Skip to content

Commit 4490003

Browse files
authored
[AMDGPU] Rename COV module flag to amdhsa_code_object_version (#79905)
The previous name 'amdgpu_code_object_version', was misleading since this is really a property of the HSA OS. The new spelling also matches the asm directive I added in bc82cfb.
1 parent 8fdec5d commit 4490003

File tree

182 files changed

+213
-202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+213
-202
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,12 +872,12 @@ void CodeGenModule::Release() {
872872
EmitMainVoidAlias();
873873

874874
if (getTriple().isAMDGPU()) {
875-
// Emit amdgpu_code_object_version module flag, which is code object version
875+
// Emit amdhsa_code_object_version module flag, which is code object version
876876
// times 100.
877877
if (getTarget().getTargetOpts().CodeObjectVersion !=
878878
llvm::CodeObjectVersionKind::COV_None) {
879879
getModule().addModuleFlag(llvm::Module::Error,
880-
"amdgpu_code_object_version",
880+
"amdhsa_code_object_version",
881881
getTarget().getTargetOpts().CodeObjectVersion);
882882
}
883883

clang/test/CodeGenCUDA/amdgpu-code-object-version-linking.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
// LINKED4: [[GEP_4_Z:%.*]] = getelementptr i8, ptr addrspace(4) %{{.*}}, i32 8
5353
// LINKED4: select i1 false, ptr addrspace(4) [[GEP_5_Z]], ptr addrspace(4) [[GEP_4_Z]]
5454
// LINKED4: load i16, ptr addrspace(4) %{{.*}}, align 2, !range [[$WS_RANGE:![0-9]*]], !invariant.load{{.*}}, !noundef
55-
// LINKED4: "amdgpu_code_object_version", i32 400
55+
// LINKED4: "amdhsa_code_object_version", i32 400
5656

5757
// LINKED5: __oclc_ABI_version = weak_odr hidden local_unnamed_addr addrspace(4) constant i32 500
5858
// LINKED5-LABEL: bar
@@ -82,7 +82,7 @@
8282
// LINKED5: [[GEP_4_Z:%.*]] = getelementptr i8, ptr addrspace(4) %{{.*}}, i32 8
8383
// LINKED5: select i1 true, ptr addrspace(4) [[GEP_5_Z]], ptr addrspace(4) [[GEP_4_Z]]
8484
// LINKED5: load i16, ptr addrspace(4) %{{.*}}, align 2, !range [[$WS_RANGE:![0-9]*]], !invariant.load{{.*}}, !noundef
85-
// LINKED5: "amdgpu_code_object_version", i32 500
85+
// LINKED5: "amdhsa_code_object_version", i32 500
8686

8787
// LINKED6: __oclc_ABI_version = weak_odr hidden local_unnamed_addr addrspace(4) constant i32 600
8888
// LINKED6-LABEL: bar
@@ -112,7 +112,7 @@
112112
// LINKED6: [[GEP_4_Z:%.*]] = getelementptr i8, ptr addrspace(4) %{{.*}}, i32 8
113113
// LINKED6: select i1 true, ptr addrspace(4) [[GEP_5_Z]], ptr addrspace(4) [[GEP_4_Z]]
114114
// LINKED6: load i16, ptr addrspace(4) %{{.*}}, align 2, !range [[$WS_RANGE:![0-9]*]], !invariant.load{{.*}}, !noundef
115-
// LINKED6: "amdgpu_code_object_version", i32 600
115+
// LINKED6: "amdhsa_code_object_version", i32 600
116116

117117
#ifdef DEVICELIB
118118
__device__ void bar(int *x, int *y, int *z)

clang/test/CodeGenCUDA/amdgpu-code-object-version.cu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
// RUN: not %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \
1919
// RUN: -mcode-object-version=4.1 -o - %s 2>&1| FileCheck %s -check-prefix=INV
2020

21-
// V4: !{{.*}} = !{i32 1, !"amdgpu_code_object_version", i32 400}
22-
// V5: !{{.*}} = !{i32 1, !"amdgpu_code_object_version", i32 500}
23-
// V6: !{{.*}} = !{i32 1, !"amdgpu_code_object_version", i32 600}
24-
// NONE-NOT: !{{.*}} = !{i32 1, !"amdgpu_code_object_version",
21+
// V4: !{{.*}} = !{i32 1, !"amdhsa_code_object_version", i32 400}
22+
// V5: !{{.*}} = !{i32 1, !"amdhsa_code_object_version", i32 500}
23+
// V6: !{{.*}} = !{i32 1, !"amdhsa_code_object_version", i32 600}
24+
// NONE-NOT: !{{.*}} = !{i32 1, !"amdhsa_code_object_version",
2525
// INV: error: invalid value '4.1' in '-mcode-object-version=4.1'

clang/test/CodeGenHIP/default-attributes.hip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ __global__ void kernel() {
4646
// OPT: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
4747
// OPT: attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "amdgpu-flat-work-group-size"="1,1024" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" }
4848
//.
49-
// OPTNONE: !0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
49+
// OPTNONE: !0 = !{i32 1, !"amdhsa_code_object_version", i32 500}
5050
// OPTNONE: !1 = !{i32 1, !"amdgpu_printf_kind", !"hostcall"}
5151
// OPTNONE: !2 = !{i32 1, !"wchar_size", i32 4}
5252
//.
53-
// OPT: !0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
53+
// OPT: !0 = !{i32 1, !"amdhsa_code_object_version", i32 500}
5454
// OPT: !1 = !{i32 1, !"amdgpu_printf_kind", !"hostcall"}
5555
// OPT: !2 = !{i32 1, !"wchar_size", i32 4}
5656
//.

clang/test/CodeGenOpenCL/amdgpu-enqueue-kernel.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ kernel void test_target_features_kernel(global int *i) {
703703
// GFX900: attributes #8 = { nounwind }
704704
// GFX900: attributes #9 = { convergent nounwind }
705705
//.
706-
// NOCPU: !0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
706+
// NOCPU: !0 = !{i32 1, !"amdhsa_code_object_version", i32 500}
707707
// NOCPU: !1 = !{i32 1, !"wchar_size", i32 4}
708708
// NOCPU: !2 = !{i32 2, i32 0}
709709
// NOCPU: !3 = !{i32 1, i32 0, i32 1, i32 0}
@@ -721,7 +721,7 @@ kernel void test_target_features_kernel(global int *i) {
721721
// NOCPU: !15 = !{i32 1}
722722
// NOCPU: !16 = !{!"int*"}
723723
//.
724-
// GFX900: !0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
724+
// GFX900: !0 = !{i32 1, !"amdhsa_code_object_version", i32 500}
725725
// GFX900: !1 = !{i32 1, !"wchar_size", i32 4}
726726
// GFX900: !2 = !{i32 2, i32 0}
727727
// GFX900: !3 = !{!4, !4, i64 0}

lld/test/ELF/lto/amdgcn-oses.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ target triple = "amdgcn-amd-amdhsa"
2828
target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5"
2929

3030
!llvm.module.flags = !{!0}
31-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
31+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}
3232

3333
define void @_start() {
3434
ret void

llvm/lib/IR/AutoUpgrade.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5072,6 +5072,15 @@ bool llvm::UpgradeModuleFlags(Module &M) {
50725072
Changed = true;
50735073
}
50745074
}
5075+
5076+
if (ID->getString() == "amdgpu_code_object_version") {
5077+
Metadata *Ops[3] = {
5078+
Op->getOperand(0),
5079+
MDString::get(M.getContext(), "amdhsa_code_object_version"),
5080+
Op->getOperand(2)};
5081+
ModFlags->setOperand(I, MDNode::get(M.getContext(), Ops));
5082+
Changed = true;
5083+
}
50755084
}
50765085

50775086
// "Objective-C Class Properties" is recently added for Objective-C. We

llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ bool isHsaAbi(const MCSubtargetInfo &STI) {
164164

165165
unsigned getAMDHSACodeObjectVersion(const Module &M) {
166166
if (auto Ver = mdconst::extract_or_null<ConstantInt>(
167-
M.getModuleFlag("amdgpu_code_object_version"))) {
167+
M.getModuleFlag("amdhsa_code_object_version"))) {
168168
return (unsigned)Ver->getZExtValue() / 100;
169169
}
170170

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
22
; RUN: verify-uselistorder < %s
33

4-
!llvm.module.flags = !{!0, !1, !2, !3}
4+
!llvm.module.flags = !{!0, !1, !2, !3, !4}
55

66
!0 = !{i32 1, !"PIC Level", i32 1}
77
!1 = !{i32 1, !"PIE Level", i32 1}
88
!2 = !{i32 1, !"Objective-C Image Info Version", i32 0}
99
!3 = !{i32 1, !"Objective-C Image Info Section", !"__DATA, __objc_imageinfo, regular, no_dead_strip"}
10+
!4 = !{i32 1, !"amdgpu_code_object_version", i32 500}
1011

1112
; CHECK: !0 = !{i32 8, !"PIC Level", i32 1}
1213
; CHECK: !1 = !{i32 7, !"PIE Level", i32 1}
1314
; CHECK: !2 = !{i32 1, !"Objective-C Image Info Version", i32 0}
1415
; CHECK: !3 = !{i32 1, !"Objective-C Image Info Section", !"__DATA,__objc_imageinfo,regular,no_dead_strip"}
15-
; CHECK: !4 = !{i32 4, !"Objective-C Class Properties", i32 0}
16+
; CHECK: !4 = !{i32 1, !"amdhsa_code_object_version", i32 500}
17+
; CHECK: !5 = !{i32 4, !"Objective-C Class Properties", i32 0}

llvm/test/CodeGen/AMDGPU/GlobalISel/crash-stack-address-O0.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ entry:
2525
}
2626

2727
!llvm.module.flags = !{!0}
28-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
28+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/dropped_debug_info_assert.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ attributes #0 = { nofree nosync nounwind readnone willreturn }
8989
!7 = distinct !DISubprogram(name: "call_debug_loc", scope: !1, file: !1, line: 8, type: !8, scopeLine: 9, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9)
9090
!8 = !DISubroutineType(types: !9)
9191
!9 = !{}
92-
!10 = !{i32 1, !"amdgpu_code_object_version", i32 500}
92+
!10 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/implicit-kernarg-backend-usage-global-isel.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,4 +370,4 @@ declare void @llvm.trap()
370370
declare void @llvm.debugtrap()
371371

372372
!llvm.module.flags = !{!0}
373-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 CODE_OBJECT_VERSION}
373+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 CODE_OBJECT_VERSION}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-assert-align.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,4 +211,4 @@ entry:
211211
}
212212

213213
!llvm.module.flags = !{!0}
214-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
214+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-atomicrmw.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ define float @test_atomicrmw_fsub(ptr addrspace(3) %addr) {
5050
}
5151

5252
!llvm.module.flags = !{!0}
53-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
53+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-call-abi-attribute-hints.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,4 @@ define void @func_call_no_other_sgprs() {
226226
}
227227

228228
!llvm.module.flags = !{!0}
229-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
229+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-call-implicit-args.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,4 +1228,4 @@ attributes #1 = { nounwind readnone speculatable willreturn }
12281228
!3 = !{i32 32, i32 2, i32 1}
12291229
!4 = !{i32 1, i32 32, i32 2}
12301230
!5 = !{i32 32, i32 1, i32 2}
1231-
!6 = !{i32 1, !"amdgpu_code_object_version", i32 500}
1231+
!6 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-call-return-values.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2969,4 +2969,4 @@ attributes #1 = { nounwind readnone }
29692969
attributes #2 = { nounwind noinline }
29702970

29712971
!llvm.module.flags = !{!0}
2972-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
2972+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-call-sret.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ define amdgpu_kernel void @test_call_external_void_func_sret_struct_i8_i32_byval
9090
}
9191

9292
!llvm.module.flags = !{!0}
93-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
93+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-call.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6059,4 +6059,4 @@ attributes #1 = { nounwind readnone }
60596059
attributes #2 = { nounwind noinline }
60606060

60616061
!llvm.module.flags = !{!0}
6062-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
6062+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-constant-fold-vector-op.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ entry:
2424
}
2525

2626
!llvm.module.flags = !{!0}
27-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
27+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-function-args.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3236,4 +3236,4 @@ define void @void_func_v2p3_inreg(<2 x ptr addrspace(3)> inreg %arg0) #0 {
32363236
attributes #0 = { nounwind }
32373237

32383238
!llvm.module.flags = !{!0}
3239-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 400}
3239+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 400}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-indirect-call.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ define amdgpu_gfx void @test_gfx_indirect_call_sgpr_ptr(ptr %fptr) {
7474
}
7575

7676
!llvm.module.flags = !{!0}
77-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
77+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-inline-asm.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,4 +333,4 @@ define amdgpu_kernel void @asm_constraint_n_n() {
333333

334334
!llvm.module.flags = !{!1}
335335
!0 = !{i32 70}
336-
!1 = !{i32 1, !"amdgpu_code_object_version", i32 500}
336+
!1 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-sibling-call.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,4 +1516,4 @@ attributes #0 = { nounwind }
15161516
attributes #1 = { nounwind noinline }
15171517

15181518
!llvm.module.flags = !{!0}
1519-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
1519+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-tail-call.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ define void @tail_call_void_func_void() {
4444
}
4545

4646
!llvm.module.flags = !{!0}
47-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
47+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.dispatch.ptr.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ declare noalias ptr addrspace(4) @llvm.amdgcn.dispatch.ptr() #0
1717
attributes #0 = { readnone }
1818

1919
!llvm.module.flags = !{!0}
20-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 400}
20+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 400}

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.is.private.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,4 @@ declare i1 @llvm.amdgcn.is.private(ptr nocapture) #0
151151
attributes #0 = { nounwind readnone speculatable }
152152

153153
!llvm.module.flags = !{!0}
154-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
154+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.is.shared.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,4 @@ declare i1 @llvm.amdgcn.is.shared(ptr nocapture) #0
151151
attributes #0 = { nounwind readnone speculatable }
152152

153153
!llvm.module.flags = !{!0}
154-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
154+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.kernarg.segment.ptr.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,4 @@ attributes #2 = { nounwind "amdgpu-implicitarg-num-bytes"="48" }
128128
attributes #3 = { nounwind "amdgpu-implicitarg-num-bytes"="38" }
129129

130130
!llvm.module.flags = !{!0}
131-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 400}
131+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 400}

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.queue.ptr.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ declare noalias ptr addrspace(4) @llvm.amdgcn.queue.ptr() #0
1717
attributes #0 = { nounwind readnone }
1818

1919
!llvm.module.flags = !{!0}
20-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 400}
20+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 400}

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.workgroup.id.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ attributes #0 = { nounwind readnone }
104104
attributes #1 = { nounwind }
105105

106106
!llvm.module.flags = !{!0}
107-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 400}
107+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 400}

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.workitem.id.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,4 +201,4 @@ attributes #1 = { nounwind }
201201
!2 = !{i32 1, i32 1, i32 64}
202202

203203
!llvm.module.flags = !{!99}
204-
!99 = !{i32 1, !"amdgpu_code_object_version", i32 CODE_OBJECT_VERSION}
204+
!99 = !{i32 1, !"amdhsa_code_object_version", i32 CODE_OBJECT_VERSION}

llvm/test/CodeGen/AMDGPU/GlobalISel/non-entry-alloca.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ declare i32 @llvm.amdgcn.workitem.id.x() #0
267267
attributes #0 = { nounwind readnone speculatable }
268268

269269
!llvm.module.flags = !{!0}
270-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
270+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}
271271
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
272272
; ASSUME1024: {{.*}}
273273
; DEFAULTSIZE: {{.*}}

llvm/test/CodeGen/AMDGPU/abi-attribute-hints-undefined-behavior.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,4 +402,4 @@ declare void @llvm.debugtrap()
402402
attributes #0 = { "amdgpu-no-dispatch-id" "amdgpu-no-dispatch-ptr" "amdgpu-no-implicitarg-ptr" "amdgpu-no-lds-kernel-id" "amdgpu-no-queue-ptr" "amdgpu-no-work-group-id-x" "amdgpu-no-work-group-id-y" "amdgpu-no-work-group-id-z" "amdgpu-no-work-item-id-x" "amdgpu-no-work-item-id-y" "amdgpu-no-work-item-id-z" }
403403

404404
!llvm.module.flags = !{!0}
405-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
405+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/addrspacecast-constantexpr.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ attributes #0 = { argmemonly nounwind }
227227
attributes #1 = { nounwind }
228228

229229
!llvm.module.flags = !{!0}
230-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
230+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}
231231
;.
232232
; AKF_HSA: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
233233
; AKF_HSA: attributes #[[ATTR1]] = { nounwind }
@@ -237,7 +237,7 @@ attributes #1 = { nounwind }
237237
; ATTRIBUTOR_HSA: attributes #[[ATTR2]] = { nounwind "amdgpu-no-completion-action" "amdgpu-no-default-queue" "amdgpu-no-dispatch-id" "amdgpu-no-dispatch-ptr" "amdgpu-no-heap-ptr" "amdgpu-no-hostcall-ptr" "amdgpu-no-lds-kernel-id" "amdgpu-no-multigrid-sync-arg" "amdgpu-no-queue-ptr" "amdgpu-no-workgroup-id-x" "amdgpu-no-workgroup-id-y" "amdgpu-no-workgroup-id-z" "amdgpu-no-workitem-id-x" "amdgpu-no-workitem-id-y" "amdgpu-no-workitem-id-z" "uniform-work-group-size"="false" }
238238
; ATTRIBUTOR_HSA: attributes #[[ATTR3]] = { nounwind "amdgpu-no-completion-action" "amdgpu-no-default-queue" "amdgpu-no-dispatch-id" "amdgpu-no-dispatch-ptr" "amdgpu-no-heap-ptr" "amdgpu-no-hostcall-ptr" "amdgpu-no-lds-kernel-id" "amdgpu-no-multigrid-sync-arg" "amdgpu-no-queue-ptr" "amdgpu-no-workgroup-id-x" "amdgpu-no-workgroup-id-y" "amdgpu-no-workgroup-id-z" "amdgpu-no-workitem-id-x" "amdgpu-no-workitem-id-y" "amdgpu-no-workitem-id-z" "amdgpu-waves-per-eu"="4,10" "uniform-work-group-size"="false" }
239239
;.
240-
; AKF_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdgpu_code_object_version", i32 500}
240+
; AKF_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdhsa_code_object_version", i32 500}
241241
;.
242-
; ATTRIBUTOR_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdgpu_code_object_version", i32 500}
242+
; ATTRIBUTOR_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdhsa_code_object_version", i32 500}
243243
;.

llvm/test/CodeGen/AMDGPU/addrspacecast.gfx6.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,4 @@ define ptr addrspace(6) @addrspacecast_flat_null_to_constant32bit() {
208208
attributes #0 = { "amdgpu-32bit-address-high-bits"="0xffff8000" }
209209

210210
!llvm.module.flags = !{!0}
211-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
211+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/addrspacecast.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,4 +424,4 @@ attributes #2 = { nounwind readnone }
424424
attributes #3 = { nounwind "amdgpu-32bit-address-high-bits"="0xffff8000" }
425425

426426
!llvm.module.flags = !{!0}
427-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 400}
427+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 400}

llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow-codegen.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,4 +775,4 @@ define double @test_pown_fast_f64_known_odd(double %x, i32 %y.arg) {
775775
}
776776

777777
!llvm.module.flags = !{!0}
778-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
778+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

llvm/test/CodeGen/AMDGPU/amdgpu.private-memory.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ attributes #0 = { nounwind "amdgpu-waves-per-eu"="1,2" "amdgpu-flat-work-group-s
530530
attributes #1 = { nounwind "amdgpu-flat-work-group-size"="1,256" }
531531

532532
!llvm.module.flags = !{!99}
533-
!99 = !{i32 1, !"amdgpu_code_object_version", i32 400}
533+
!99 = !{i32 1, !"amdhsa_code_object_version", i32 400}
534534

535535
; HSAOPT: !1 = !{}
536536
; HSAOPT: !2 = !{i32 0, i32 257}

llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa-call.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ attributes #6 = { "enqueued-block" }
10121012

10131013

10141014
!llvm.module.flags = !{!0}
1015-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
1015+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}
10161016
;.
10171017
; AKF_HSA: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
10181018
; AKF_HSA: attributes #[[ATTR1]] = { nounwind "target-cpu"="fiji" }
@@ -1055,7 +1055,7 @@ attributes #6 = { "enqueued-block" }
10551055
; ATTRIBUTOR_HSA: attributes #[[ATTR28]] = { nounwind }
10561056
; ATTRIBUTOR_HSA: attributes #[[ATTR29]] = { "enqueued-block" }
10571057
;.
1058-
; AKF_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdgpu_code_object_version", i32 500}
1058+
; AKF_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdhsa_code_object_version", i32 500}
10591059
;.
1060-
; ATTRIBUTOR_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdgpu_code_object_version", i32 500}
1060+
; ATTRIBUTOR_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdhsa_code_object_version", i32 500}
10611061
;.

llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ attributes #0 = { nounwind readnone speculatable }
635635
attributes #1 = { nounwind }
636636

637637
!llvm.module.flags = !{!0}
638-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
638+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}
639639

640640
;.
641641
; AKF_HSA: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
@@ -657,7 +657,7 @@ attributes #1 = { nounwind }
657657
; ATTRIBUTOR_HSA: attributes #[[ATTR12]] = { nounwind "amdgpu-no-completion-action" "amdgpu-no-default-queue" "amdgpu-no-dispatch-id" "amdgpu-no-dispatch-ptr" "amdgpu-no-heap-ptr" "amdgpu-no-hostcall-ptr" "amdgpu-no-lds-kernel-id" "amdgpu-no-multigrid-sync-arg" "amdgpu-no-queue-ptr" "amdgpu-no-workgroup-id-x" "amdgpu-no-workgroup-id-y" "amdgpu-no-workgroup-id-z" "amdgpu-no-workitem-id-x" "amdgpu-no-workitem-id-y" "amdgpu-no-workitem-id-z" "uniform-work-group-size"="false" }
658658
; ATTRIBUTOR_HSA: attributes #[[ATTR13]] = { nounwind "amdgpu-no-completion-action" "amdgpu-no-default-queue" "amdgpu-no-dispatch-id" "amdgpu-no-dispatch-ptr" "amdgpu-no-heap-ptr" "amdgpu-no-hostcall-ptr" "amdgpu-no-implicitarg-ptr" "amdgpu-no-lds-kernel-id" "amdgpu-no-multigrid-sync-arg" "amdgpu-no-queue-ptr" "amdgpu-no-workgroup-id-x" "amdgpu-no-workgroup-id-y" "amdgpu-no-workgroup-id-z" "amdgpu-no-workitem-id-x" "amdgpu-no-workitem-id-y" "amdgpu-no-workitem-id-z" "amdgpu-waves-per-eu"="4,10" "uniform-work-group-size"="false" }
659659
;.
660-
; AKF_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdgpu_code_object_version", i32 500}
660+
; AKF_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdhsa_code_object_version", i32 500}
661661
;.
662-
; ATTRIBUTOR_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdgpu_code_object_version", i32 500}
662+
; ATTRIBUTOR_HSA: [[META0:![0-9]+]] = !{i32 1, !"amdhsa_code_object_version", i32 500}
663663
;.

llvm/test/CodeGen/AMDGPU/attr-amdgpu-flat-work-group-size.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ define amdgpu_kernel void @min_1024_max_1024() #3 {
130130
attributes #3 = {"amdgpu-flat-work-group-size"="1024,1024"}
131131

132132
!llvm.module.flags = !{!0}
133-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 400}
133+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 400}
134134

135135
; HSAMD: amdhsa.kernels
136136
; HSAMD: .max_flat_workgroup_size: 64

llvm/test/CodeGen/AMDGPU/attributor-noopt.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ define amdgpu_kernel void @foo() {
3636
}
3737

3838
!llvm.module.flags = !{!0}
39-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 CODE_OBJECT_VERSION}
39+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 CODE_OBJECT_VERSION}

llvm/test/CodeGen/AMDGPU/blender-no-live-segment-at-def-implicit-def.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,4 @@ kernel_direct_lighting.exit: ; preds = %if.end294.i.i, %ent
124124
declare float @_Z3dotDv3_fS_(<3 x float>)
125125

126126
!llvm.module.flags = !{!0}
127-
!0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
127+
!0 = !{i32 1, !"amdhsa_code_object_version", i32 500}

0 commit comments

Comments
 (0)