[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 30 15:35:20 PDT 2024
================
@@ -245,6 +274,20 @@ void SemaHLSL::CheckEntryPoint(FunctionDecl *FD) {
<< llvm::Triple::getEnvironmentTypeName(ST);
FD->setInvalidDecl();
}
+ if (const auto *NT = FD->getAttr<HLSLWaveSizeAttr>()) {
+ if (Ver.getMajor() < 6u ||
+ (Ver.getMajor() == 6u && Ver.getMinor() < 6u)) {
+ Diag(NT->getLocation(), diag::err_hlsl_attribute_in_wrong_shader_model)
+ << "wavesize"
+ << "6.6";
+ FD->setInvalidDecl();
+ } else if (NT->getSpelledArgsCount() > 1 &&
+ (Ver.getMajor() == 6u && Ver.getMinor() < 8u)) {
----------------
bogner wrote:
same here
https://github.com/llvm/llvm-project/pull/101240
More information about the cfe-commits
mailing list