Debian Codegraph @

llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveBallot.ll

raw
1 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %}
3
4 ; CHECK-DAG: %[[#bool:]] = OpTypeBool
5 ; CHECK-DAG: %[[#uint:]] = OpTypeInt 32 0
6 ; CHECK-DAG: %[[#scope:]] = OpConstant %[[#uint]] 3
7 ; CHECK-DAG: %[[#bitmask:]] = OpTypeVector %[[#uint]] 4
8 ; CHECK-DAG: OpCapability GroupNonUniformBallot
9
10 ; CHECK-LABEL: Begin function test_wave_ballot
11 define <4 x i32> @test_wave_ballot(i1 %p1) #0 {
12 entry:
13 ; CHECK: %[[#param:]] = OpFunctionParameter %[[#bool]]
14 ; CHECK: %{{.+}} = OpGroupNonUniformBallot %[[#bitmask]] %[[#scope]] %[[#param]]
15 %0 = call token @llvm.experimental.convergence.entry()
16 %ret = call <4 x i32> @llvm.spv.wave.ballot(i1 %p1) [ "convergencectrl"(token %0) ]
17 ret <4 x i32> %ret
18 }
19
20 declare <4 x i32> @llvm.spv.wave.ballot(i1) #0
21
22 attributes #0 = { convergent }