diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2023-06-18 15:40:43 -0400 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2023-06-23 19:52:06 -0400 |
commit | 9d84f8dc948b3188fdec9a1a080eb6d845c2082d (patch) | |
tree | 2a536da429f68c197db685529ba6f6812f3ddf37 /clang/lib/Sema/SemaChecking.cpp | |
parent | abe34ce4e3ba460743150dea7c8d557cd6ba6eb0 (diff) | |
download | llvm-9d84f8dc948b3188fdec9a1a080eb6d845c2082d.zip llvm-9d84f8dc948b3188fdec9a1a080eb6d845c2082d.tar.gz llvm-9d84f8dc948b3188fdec9a1a080eb6d845c2082d.tar.bz2 |
clang: Add __builtin_elementwise_rint and nearbyint
These are basically the same thing and only differ for strictfp,
so add both for future proofing. Note all the elementwise functions are
currently broken for strictfp, and use non-constrained ops. Add a test
that demonstrates this, but doesn't attempt to fix it.
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index b652f25..e713aba 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -2637,6 +2637,8 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, case Builtin::BI__builtin_elementwise_log10: case Builtin::BI__builtin_elementwise_roundeven: case Builtin::BI__builtin_elementwise_round: + case Builtin::BI__builtin_elementwise_rint: + case Builtin::BI__builtin_elementwise_nearbyint: case Builtin::BI__builtin_elementwise_sin: case Builtin::BI__builtin_elementwise_trunc: case Builtin::BI__builtin_elementwise_canonicalize: { |