Inlining currently assumes that either all function use controled
convergence or none of them do. This is why we need to have the entry
point wrapper use controled convergence.
c85611e858/llvm/lib/Transforms/Utils/InlineFunction.cpp (L2431-L2439)
12 lines
399 B
HLSL
12 lines
399 B
HLSL
// RUN: %clang_cc1 -triple spirv-pc-vulkan-compute -finclude-default-header -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s
|
|
|
|
// CHECK-LABEL: define void @main()
|
|
// CHECK-NEXT: entry:
|
|
// CHECK-NEXT: [[token:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
|
// CHECK-NEXT: call spir_func void @_Z4mainv() [ "convergencectrl"(token [[token]]) ]
|
|
|
|
[numthreads(1,1,1)]
|
|
void main() {
|
|
}
|
|
|