annotate clang/test/SemaHLSL/WaveBuiltinAvailability.hlsl @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
1 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel5.0-library -verify %s
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
2 // WaveActiveCountBits is unavailable before ShaderModel 6.0.
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
3
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
4 unsigned foo(bool b) {
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
5 // expected-warning@#site {{'WaveActiveCountBits' is only available on HLSL ShaderModel 6.0 or newer}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
6 // expected-note@hlsl/hlsl_intrinsics.h:* {{'WaveActiveCountBits' has been marked as being introduced in HLSL ShaderModel 6.0 here, but the deployment target is HLSL ShaderModel 5.0}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
7 // expected-note@#site {{enclose 'WaveActiveCountBits' in a __builtin_available check to silence this warning}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
8 return hlsl::WaveActiveCountBits(b); // #site
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
9 }