mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

Also update LIT tests and docs. For more details, see https://llvm.org/docs/AMDGPUUsage.html#code-object-v5-metadata Corresponding llvm-objdump AMDGPU lit tests are updated in a follow-up PR.
57 lines
2.6 KiB
Plaintext
57 lines
2.6 KiB
Plaintext
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
|
|
// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -fno-ident -fcuda-is-device \
|
|
// RUN: -emit-llvm -o - %s | FileCheck -check-prefix=OPTNONE %s
|
|
|
|
// RUN: %clang_cc1 -O3 -triple amdgcn-amd-amdhsa -x hip -fno-ident -fcuda-is-device \
|
|
// RUN: -emit-llvm -o - %s | FileCheck -check-prefix=OPT %s
|
|
|
|
#define __device__ __attribute__((device))
|
|
#define __global__ __attribute__((global))
|
|
|
|
// OPTNONE: Function Attrs: convergent mustprogress noinline nounwind optnone
|
|
// OPTNONE-LABEL: define {{[^@]+}}@_Z4funcv
|
|
// OPTNONE-SAME: () #[[ATTR0:[0-9]+]] {
|
|
// OPTNONE-NEXT: entry:
|
|
// OPTNONE-NEXT: ret void
|
|
//
|
|
// OPT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
|
|
// OPT-LABEL: define {{[^@]+}}@_Z4funcv
|
|
// OPT-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
|
// OPT-NEXT: entry:
|
|
// OPT-NEXT: ret void
|
|
//
|
|
__device__ void func() {
|
|
|
|
}
|
|
|
|
// OPTNONE: Function Attrs: convergent mustprogress noinline norecurse nounwind optnone
|
|
// OPTNONE-LABEL: define {{[^@]+}}@_Z6kernelv
|
|
// OPTNONE-SAME: () #[[ATTR1:[0-9]+]] {
|
|
// OPTNONE-NEXT: entry:
|
|
// OPTNONE-NEXT: ret void
|
|
//
|
|
// OPT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
|
|
// OPT-LABEL: define {{[^@]+}}@_Z6kernelv
|
|
// OPT-SAME: () local_unnamed_addr #[[ATTR1:[0-9]+]] {
|
|
// OPT-NEXT: entry:
|
|
// OPT-NEXT: ret void
|
|
//
|
|
__global__ void kernel() {
|
|
|
|
}
|
|
//.
|
|
// OPTNONE: attributes #0 = { convergent mustprogress noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
|
|
// OPTNONE: attributes #1 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,1024" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" }
|
|
//.
|
|
// OPT: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
|
|
// 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" }
|
|
//.
|
|
// OPTNONE: !0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
|
|
// OPTNONE: !1 = !{i32 1, !"amdgpu_printf_kind", !"hostcall"}
|
|
// OPTNONE: !2 = !{i32 1, !"wchar_size", i32 4}
|
|
//.
|
|
// OPT: !0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
|
|
// OPT: !1 = !{i32 1, !"amdgpu_printf_kind", !"hostcall"}
|
|
// OPT: !2 = !{i32 1, !"wchar_size", i32 4}
|
|
//.
|