llvm-project/clang/test/SemaHLSL/WaveBuiltinAvailability.hlsl
Farzon Lotfi 9ee4883c61
[HLSL] Reorganize aliased intrinsics into their own file (#129619)
- fixes #129616
- alphabetize the or intrinsic
2025-03-04 23:33:54 -05:00

11 lines
553 B
HLSL

// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel5.0-library -verify %s
// WaveActiveCountBits is unavailable before ShaderModel 6.0.
[shader("compute")]
[numthreads(8,8,1)]
unsigned foo() {
// expected-error@#site {{'WaveActiveCountBits' is only available on Shader Model 6.0 or newer}}
// expected-note@hlsl/hlsl_alias_intrinsics.h:* {{'WaveActiveCountBits' has been marked as being introduced in Shader Model 6.0 here, but the deployment target is Shader Model 5.0}}
return hlsl::WaveActiveCountBits(1); // #site
}