diff options
author | Joshua Batista <jbatista@microsoft.com> | 2023-02-02 11:10:53 -0800 |
---|---|---|
committer | Joshua Batista <jbatista@microsoft.com> | 2023-02-02 11:36:22 -0800 |
commit | 26eb70820fb860ccf97c57ee26502ff621cf4ed2 (patch) | |
tree | 7bf97a3bbe38b6725eee2b9756870435e917f319 /clang/lib/Sema/SemaChecking.cpp | |
parent | 5cc2501136c7676c0fc9aabdb9a6c5b50bbe2e41 (diff) | |
download | llvm-26eb70820fb860ccf97c57ee26502ff621cf4ed2.zip llvm-26eb70820fb860ccf97c57ee26502ff621cf4ed2.tar.gz llvm-26eb70820fb860ccf97c57ee26502ff621cf4ed2.tar.bz2 |
Add builtin_elementwise_log
Add codegen for llvm log elementwise builtin
The log elementwise builtin is necessary for HLSL codegen.
Tests were added to make sure that the expected errors are encountered when these functions are given inputs of incompatible types.
The new builtin is restricted to floating point types only.
Reviewed By: beanz
Differential Revision: https://reviews.llvm.org/D140489
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 4602284..f1c4aab 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -2609,6 +2609,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, case Builtin::BI__builtin_elementwise_ceil: case Builtin::BI__builtin_elementwise_cos: case Builtin::BI__builtin_elementwise_floor: + case Builtin::BI__builtin_elementwise_log: case Builtin::BI__builtin_elementwise_roundeven: case Builtin::BI__builtin_elementwise_sin: case Builtin::BI__builtin_elementwise_trunc: |