aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorTex Riddell <texr@microsoft.com>2024-10-01 14:41:43 -0700
committerGitHub <noreply@github.com>2024-10-01 14:41:43 -0700
commitb70d32789c9463d49b46b4e57c44607d1c956e4c (patch)
treea0cc02d5a2237dabe93461b3d9cee7895a06beb6 /clang/lib/Sema/SemaChecking.cpp
parent513404806646ad07f76b0fda3c11a9847fc5ce84 (diff)
downloadllvm-b70d32789c9463d49b46b4e57c44607d1c956e4c.zip
llvm-b70d32789c9463d49b46b4e57c44607d1c956e4c.tar.gz
llvm-b70d32789c9463d49b46b4e57c44607d1c956e4c.tar.bz2
[HLSL][clang] Add elementwise builtin for atan2 (p3) (#110187)
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - Add HLSL frontend for atan2 - Add clang Builtin, map to new llvm.atan2 - SemaChecking restrict to floating point and 2 args - SemaHLSL restrict to float or half. - Add to clang ReleaseNotes.rst and LanguageExtensions.rst - Add half-float-only-errors2.hlsl for 2 arg intrinsics, and update half-float-only-errors.hlsl with scalar case for consistency - Remove fmod-errors.hlsl and pow-errors.hlsl now covered in half-float-only-errors2.hlsl Part 3 for Implement the atan2 HLSL Function #70096.
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 8634b54..7320249 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -2755,6 +2755,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
// These builtins restrict the element type to floating point
// types only, and take in two arguments.
+ case Builtin::BI__builtin_elementwise_atan2:
case Builtin::BI__builtin_elementwise_fmod:
case Builtin::BI__builtin_elementwise_pow: {
if (BuiltinElementwiseMath(TheCall))