2021-07-13 10:14:50 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals
|
2020-03-12 05:12:20 +08:00
|
|
|
; RUN: opt -S -mtriple=amdgcn-amd- -amdgpu-annotate-kernel-features %s | FileCheck %s
|
2019-03-07 08:54:04 +08:00
|
|
|
|
|
|
|
; Test to verify if the attribute gets propagated across nested function calls
|
|
|
|
|
|
|
|
define void @func1() #0 {
|
2021-07-13 10:14:50 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@func1
|
|
|
|
; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
|
|
|
|
; CHECK-NEXT: ret void
|
|
|
|
;
|
2019-03-07 08:54:04 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @func2() #1 {
|
2021-07-13 10:14:50 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@func2
|
|
|
|
; CHECK-SAME: () #[[ATTR0]] {
|
|
|
|
; CHECK-NEXT: call void @func1()
|
|
|
|
; CHECK-NEXT: ret void
|
|
|
|
;
|
2019-03-07 08:54:04 +08:00
|
|
|
call void @func1()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define amdgpu_kernel void @kernel3() #2 {
|
2021-07-13 10:14:50 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@kernel3
|
|
|
|
; CHECK-SAME: () #[[ATTR1:[0-9]+]] {
|
|
|
|
; CHECK-NEXT: call void @func2()
|
|
|
|
; CHECK-NEXT: ret void
|
|
|
|
;
|
2019-03-07 08:54:04 +08:00
|
|
|
call void @func2()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
attributes #2 = { "uniform-work-group-size"="true" }
|
|
|
|
|
2021-07-13 10:14:50 +08:00
|
|
|
;.
|
|
|
|
; CHECK: attributes #[[ATTR0]] = { "uniform-work-group-size"="true" }
|
|
|
|
; CHECK: attributes #[[ATTR1]] = { "amdgpu-calls" "uniform-work-group-size"="true" }
|
|
|
|
;.
|