Files
llvm-project/llvm/test/CodeGen/DirectX/WavePrefixBitCount.ll
Joshua Batista 293a668329 [HLSL] Add wave prefix count bits function (#178059)
This PR adds the WavePrefixCountBits function to HLSL, including spirv
and DXIL code generation.
Fixes https://github.com/llvm/llvm-project/issues/99171
2026-01-29 12:09:27 -08:00

11 lines
376 B
LLVM

; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s
; Test that WavePrefixCountBits maps down to the DirectX op
define noundef i32 @wave_prefix_count_bits(i1 noundef %expr) {
entry:
; CHECK: call i32 @dx.op.wavePrefixOp(i32 136, i1 %expr)
%ret = call i32 @llvm.dx.wave.prefix.bit.count(i1 %expr)
ret i32 %ret
}