================ @@ -3136,6 +3192,31 @@ bool Sema::CheckSVEBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { bool Sema::CheckNeonBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) { + if (const FunctionDecl *FD = getCurFunctionDecl()) { + std::optional<ArmStreamingType> BuiltinType; + + bool IsNeon = false; + switch (BuiltinID) { + default: + break; +#define GET_NEON_BUILTINS +#define TARGET_BUILTIN(id, x, y, z) \ + case NEON::BI##id: \ + IsNeon = true; \ + break; +#define BUILTIN(id, x, y) TARGET_BUILTIN(id, x, y, ""); +#include "clang/Basic/arm_neon.inc" +#undef TARGET_BUILTIN +#undef BUILTIN +#undef GET_NEON_BUILTINS + } + + if (IsNeon) { + checkArmStreamingBuiltin(*this, TheCall, FD, ArmNonStreaming); + return true; + } ---------------- sdesmalen-arm wrote:
nit: Can this be simplified as: ``` switch (BuiltinID) { default: break; #define TARGET_BUILTIN(id, ...) case NEON::BI##id: #define BUILTIN(id, ...) case NEON::BI##id: #define GET_NEON_BUILTINS #include "clang/Basic/arm_neon.inc" return checkArmStreamingBuiltin(*this, TheCall, FD, ArmNonStreaming); #undef GET_NEON_BUILTINS #undef BUILTIN #undef TARGET_BUILTIN ``` ? https://github.com/llvm/llvm-project/pull/73672 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits