1 // RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
2 // RUN: spirv-pc-vulkan-library %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s
4 // CHECK: define spir_func noundef i32 @_Z6test_1v() [[A0:#[0-9]+]] {
5 // CHECK: %[[C1:[0-9]+]] = call token @llvm.experimental.convergence.entry()
6 // CHECK: call spir_func i32 @__hlsl_wave_get_lane_index() [ "convergencectrl"(token %[[C1]]) ]
8 return WaveGetLaneIndex();
11 // CHECK-DAG: declare spir_func i32 @__hlsl_wave_get_lane_index() [[A1:#[0-9]+]]
13 // CHECK: define spir_func noundef i32 @_Z6test_2v() [[A0]] {
14 // CHECK: %[[C2:[0-9]+]] = call token @llvm.experimental.convergence.entry()
15 // CHECK: call spir_func noundef i32 @_Z6test_1v() {{#[0-9]+}} [ "convergencectrl"(token %[[C2]]) ]
20 // CHECK-DAG: attributes [[A0]] = {{{.*}}convergent{{.*}}}
21 // CHECK-DAG: attributes [[A1]] = {{{.*}}convergent{{.*}}}