clang: Add __builtin_elementwise_rint and nearbyint
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 18 Jun 2023 19:40:43 +0000 (15:40 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 23 Jun 2023 23:52:06 +0000 (19:52 -0400)
commit9d84f8dc948b3188fdec9a1a080eb6d845c2082d
tree2a536da429f68c197db685529ba6f6812f3ddf37
parentabe34ce4e3ba460743150dea7c8d557cd6ba6eb0
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.
clang/docs/LanguageExtensions.rst
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/Builtins.def
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGen/builtins-elementwise-math.c
clang/test/CodeGen/strictfp-elementwise-bulitins.cpp [new file with mode: 0644]
clang/test/Sema/builtins-elementwise-math.c
clang/test/SemaCXX/builtins-elementwise-math.cpp