Skip to content

Commit 3001efe

Browse files
committed
Update test after nvvm.annotations conversion in 6c2e170
[NVPTX] Convert vector function nvvm.annotations to attributes (llvm/llvm-project#127736) Replace some more nvvm.annotations with function attributes, auto-upgrading the annotations as needed. These new attributes will be more idiomatic and compile-time efficient than the annotations. - !"maxntid[xyz]" -> "nvvm.maxntid" - !"reqntid[xyz]" -> "nvvm.reqntid" - !"cluster_dim_[xyz]" -> "nvvm.cluster_dim"
1 parent ecdfa9c commit 3001efe

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

llvm/test/CodeGen/NVPTX/local-accessor-to-shared-memory-annotations.ll

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ entry:
2727
; CHECK: @_ZTS14example_kernel_shared_mem = external addrspace(3) global [0 x i8], align 4
2828
;.
2929
; CHECK-LABEL: define ptx_kernel void @_ZTS14example_kernel(
30-
; CHECK-SAME: i32 [[TMP0:%.*]], ptr addrspace(1) alignstack(8) [[B:%.*]], i32 [[C:%.*]]) {
30+
; CHECK-SAME: i32 [[TMP0:%.*]], ptr addrspace(1) alignstack(8) [[B:%.*]], i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
3131
; CHECK-NEXT: [[ENTRY:.*:]]
3232
; CHECK-NEXT: [[TMP1:%.*]] = getelementptr inbounds [0 x i8], ptr addrspace(3) @_ZTS14example_kernel_shared_mem, i32 0, i32 [[TMP0]]
3333
; CHECK-NEXT: [[A:%.*]] = bitcast ptr addrspace(3) [[TMP1]] to ptr addrspace(3)
@@ -37,8 +37,9 @@ entry:
3737
; CHECK-NEXT: ret void
3838
;
3939
;.
40+
; CHECK: attributes #[[ATTR0]] = { "nvvm.maxntid"="256,64,256" }
41+
;.
4042
; CHECK: [[META0:![0-9]+]] = !{i32 1, !"sycl-device", i32 1}
41-
; CHECK: [[META1:![0-9]+]] = distinct !{ptr @_ZTS14example_kernel, !"maxntidx", i32 256, !"dummy", i32 1, !"maxntidy", i32 64}
42-
; CHECK: [[META3:![0-9]+]] = distinct !{ptr @_ZTS14example_kernel, !"maxntidz", i32 256}
43-
; CHECK: [[META4:![0-9]+]] = distinct !{ptr @_ZTS14example_kernel, !"dummy", i32 1}
43+
; CHECK: [[META1:![0-9]+]] = distinct !{ptr @_ZTS14example_kernel, !"dummy", i32 1}
44+
; CHECK: [[META2:![0-9]+]] = distinct !{ptr @_ZTS14example_kernel, !"align", i32 8}
4445
;.

llvm/test/CodeGen/NVPTX/local-accessor-to-shared-memory-basic-transformation.ll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ entry:
3333
; CHECK: @_ZTS14example_kernel_shared_mem = external addrspace(3) global [0 x i8], align 4
3434
;.
3535
; CHECK-LABEL: define ptx_kernel void @_ZTS14example_kernel(
36-
; CHECK-SAME: i32 [[TMP0:%.*]], ptr addrspace(1) [[B:%.*]], i32 [[C:%.*]]) {
36+
; CHECK-SAME: i32 [[TMP0:%.*]], ptr addrspace(1) [[B:%.*]], i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
3737
; CHECK-NEXT: [[ENTRY:.*:]]
3838
; CHECK-NEXT: [[TMP1:%.*]] = getelementptr inbounds [0 x i8], ptr addrspace(3) @_ZTS14example_kernel_shared_mem, i32 0, i32 [[TMP0]]
3939
; CHECK-NEXT: [[A:%.*]] = bitcast ptr addrspace(3) [[TMP1]] to ptr addrspace(3)
@@ -43,8 +43,9 @@ entry:
4343
; CHECK-NEXT: ret void
4444
;
4545
;.
46+
; CHECK: attributes #[[ATTR0]] = { "nvvm.maxntid"="256" }
47+
;.
4648
; CHECK: [[META0:![0-9]+]] = !{i32 1, !"sycl-device", i32 1}
4749
; CHECK: [[META1:![0-9]+]] = distinct !{ptr @_ZTS14example_kernel, !"dummy", i32 1}
48-
; CHECK: [[META6:![0-9]+]] = distinct !{ptr @_ZTS14example_kernel, !"maxntidx", i32 256}
49-
; CHECK: [[META7:![0-9]+]] = !{i32 1, i32 4}
50+
; CHECK: [[META2:![0-9]+]] = !{i32 1, i32 4}
5051
;.

0 commit comments

Comments
 (0)