mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 07:26:05 +00:00

This feature is currently not supported in the compiler. To facilitate this we emit a stub version of each kernel function body with different name mangling scheme, and replaces the respective kernel call-sites appropriately. Fixes https://github.com/llvm/llvm-project/issues/60313 D120566 was an earlier attempt made to upstream a solution for this issue. --------- Co-authored-by: anikelal <anikelal@amd.com>
24 lines
1.0 KiB
Common Lisp
24 lines
1.0 KiB
Common Lisp
// RUN: %clang_cc1 -emit-llvm -O0 -cl-std=CL1.2 -o - %s 2>&1 | FileCheck %s -check-prefixes CHECK,CHECK-UNIFORM
|
|
// RUN: %clang_cc1 -emit-llvm -O0 -cl-std=CL2.0 -o - %s 2>&1 | FileCheck %s -check-prefixes CHECK,CHECK-NONUNIFORM
|
|
// RUN: %clang_cc1 -emit-llvm -O0 -cl-std=CL2.0 -cl-uniform-work-group-size -o - %s 2>&1 | FileCheck %s -check-prefixes CHECK,CHECK-UNIFORM
|
|
// RUN: %clang_cc1 -emit-llvm -O0 -cl-std=CL2.0 -foffload-uniform-block -o - %s 2>&1 | FileCheck %s -check-prefixes CHECK,CHECK-UNIFORM
|
|
|
|
kernel void ker() {};
|
|
// CHECK: define{{.*}}@ker() #[[ATTR0:[0-9]+]]
|
|
// CHECK: call void @__clang_ocl_kern_imp_ker() #[[ATTR2:[0-9]+]]
|
|
|
|
// CHECK: define{{.*}}@__clang_ocl_kern_imp_ker() #[[ATTR1:[0-9]+]]
|
|
|
|
void foo() {};
|
|
// CHECK: define{{.*}}@foo() #[[ATTR1:[0-9]+]]
|
|
|
|
// CHECK: attributes #[[ATTR0]]
|
|
// CHECK-UNIFORM: "uniform-work-group-size"="true"
|
|
// CHECK-NONUNIFORM: "uniform-work-group-size"="false"
|
|
|
|
// CHECK: attributes #[[ATTR1]]
|
|
// CHECK-NOT: uniform-work-group-size
|
|
|
|
// CHECK: attributes #[[ATTR2]]
|
|
// CHECK-NOT: uniform-work-group-size
|