1 // RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
2 // RUN: spirv-pc-vulkan-compute %s -emit-llvm -disable-llvm-passes -o - | \
3 // RUN: FileCheck %s --check-prefixes=CHECK,CHECK-SPIRV
4 // RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
5 // RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o - | \
6 // RUN: FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
10 // CHECK-SPIRV: %[[#entry_tok:]] = call token @llvm.experimental.convergence.entry()
12 // CHECK-SPIRV: %[[#loop_tok:]] = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token %[[#entry_tok]]) ]
15 // CHECK-DXIL: %[[#]] = call i1 @llvm.dx.wave.is.first.lane()
16 // CHECK-SPIRV: %[[#]] = call spir_func i1 @llvm.spv.wave.is.first.lane()
17 // CHECK-SPIRV-SAME: [ "convergencectrl"(token %[[#loop_tok]]) ]
18 if (WaveIsFirstLane()) {
23 // CHECK-DXIL: %[[#]] = call i1 @llvm.dx.wave.is.first.lane()
24 // CHECK-SPIRV: %[[#]] = call spir_func i1 @llvm.spv.wave.is.first.lane()
25 // CHECK-SPIRV-SAME: [ "convergencectrl"(token %[[#entry_tok]]) ]
26 if (WaveIsFirstLane()) {
31 // CHECK-DXIL: i1 @llvm.dx.wave.is.first.lane() #[[#attr:]]
32 // CHECK-SPIRV: i1 @llvm.spv.wave.is.first.lane() #[[#attr:]]
34 // CHECK: attributes #[[#attr]] = {{{.*}} convergent {{.*}}}