1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals
2 ; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-attributor %s | FileCheck -allow-unused-prefixes %s
6 ; CHECK: @[[X:[a-zA-Z0-9_$"\\.-]+]] = global i32 0
9 ; CHECK-LABEL: define {{[^@]+}}@func1
10 ; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
11 ; CHECK-NEXT: store i32 0, ptr @x, align 4
12 ; CHECK-NEXT: ret void
18 define void @func4() {
19 ; CHECK-LABEL: define {{[^@]+}}@func4
20 ; CHECK-SAME: () #[[ATTR0]] {
21 ; CHECK-NEXT: store i32 0, ptr @x, align 4
22 ; CHECK-NEXT: ret void
28 define void @func2() #0 {
29 ; CHECK-LABEL: define {{[^@]+}}@func2
30 ; CHECK-SAME: () #[[ATTR0]] {
31 ; CHECK-NEXT: call void @func4()
32 ; CHECK-NEXT: call void @func1()
33 ; CHECK-NEXT: ret void
40 define void @func3() {
41 ; CHECK-LABEL: define {{[^@]+}}@func3
42 ; CHECK-SAME: () #[[ATTR0]] {
43 ; CHECK-NEXT: call void @func1()
44 ; CHECK-NEXT: ret void
50 define amdgpu_kernel void @kernel3() #0 {
51 ; CHECK-LABEL: define {{[^@]+}}@kernel3
52 ; CHECK-SAME: () #[[ATTR1:[0-9]+]] {
53 ; CHECK-NEXT: call void @func2()
54 ; CHECK-NEXT: call void @func3()
55 ; CHECK-NEXT: ret void
62 attributes #0 = { "uniform-work-group-size"="false" }
64 ; CHECK: attributes #[[ATTR0]] = { "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" }
65 ; CHECK: attributes #[[ATTR1]] = { "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" "uniform-work-group-size"="false" }