[clang] [llvm] [Vectorize][OpenMP] Support header-provided declare simd math variants (PR #189523)
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 20 07:45:25 PDT 2026
================
@@ -69,6 +69,19 @@ static bool shouldEmitBuiltinAsIR(unsigned BuiltinID,
return false;
}
+static bool shouldPreserveLibCallForDeclareSimd(const FunctionDecl *FD,
+ const LangOptions &LangOpts) {
+ if (!FD || !LangOpts.OpenMP)
+ return false;
+
+ for (const FunctionDecl *Redecl : FD->redecls()) {
+ if (Redecl->hasAttr<OMPDeclareSimdDeclAttr>())
+ return true;
+ }
+
+ return false;
----------------
alexey-bataev wrote:
return any_of(FD->redecls(), [](const FunctionDecl *Redecl) {return Redecl->hasAttr<OMPDeclareSimdDeclAttr>();});
https://github.com/llvm/llvm-project/pull/189523
More information about the cfe-commits
mailing list