aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2022-12-07 22:48:27 -0500
committerMatt Arsenault <Matthew.Arsenault@amd.com>2022-12-21 18:01:42 -0500
commit437346abe18ec4fc982ae36f6821487dafc1a06e (patch)
tree9622d1abf5124917b5fd58edfe2eb2beaf9465b3 /clang/lib/Sema/SemaChecking.cpp
parent1f47fee2948ef48781084afe0426171d000d7997 (diff)
downloadllvm-437346abe18ec4fc982ae36f6821487dafc1a06e.zip
llvm-437346abe18ec4fc982ae36f6821487dafc1a06e.tar.gz
llvm-437346abe18ec4fc982ae36f6821487dafc1a06e.tar.bz2
clang: Add __builtin_elementwise canonicalize and copysign
Just copy paste from the other functions. I also need fma, but the current code seems to assume 1 or 2 arguments.
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 68ae989..d009d55 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -2577,7 +2577,8 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
case Builtin::BI__builtin_elementwise_floor:
case Builtin::BI__builtin_elementwise_roundeven:
case Builtin::BI__builtin_elementwise_sin:
- case Builtin::BI__builtin_elementwise_trunc: {
+ case Builtin::BI__builtin_elementwise_trunc:
+ case Builtin::BI__builtin_elementwise_canonicalize: {
if (PrepareBuiltinElementwiseMathOneArgCall(TheCall))
return ExprError();
@@ -2620,6 +2621,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
case Builtin::BI__builtin_elementwise_min:
case Builtin::BI__builtin_elementwise_max:
+ case Builtin::BI__builtin_elementwise_copysign:
if (SemaBuiltinElementwiseMath(TheCall))
return ExprError();
break;