Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HLSL] Add WaveActiveCountBits as Langugage builtin function for HLSL
One clang builtins are introduced uint WaveActiveCountBits( bool bBit ) as Langugage builtin function for HLSL. The detail for WaveActiveCountBits is at https://github.com/microsoft/DirectXShaderCompiler/wiki/Wave-Intrinsics#uint-waveactivecountbits-bool-bbit- This is only clang part change to make WaveActiveCountBits into AST. llvm intrinsic for WaveActiveCountBits will be add in separate PR. Reviewed By: Anastasia Differential Revision: https://reviews.llvm.org/D126857
- Loading branch information
1 parent
1882c25
commit 6bea9ff
Showing
3 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// RUN: %clang_cc1 -x hlsl -triple dxil--shadermodel6.7-library %s -verify | ||
|
||
// Make sure WaveActiveCountBits is accepted. | ||
|
||
// expected-no-diagnostics | ||
unsigned foo(bool b) { | ||
return WaveActiveCountBits(b); | ||
} |