Add builtin_elementwise_log
authorJoshua Batista <jbatista@microsoft.com>
Thu, 2 Feb 2023 19:10:53 +0000 (11:10 -0800)
committerJoshua Batista <jbatista@microsoft.com>
Thu, 2 Feb 2023 19:36:22 +0000 (11:36 -0800)
commit26eb70820fb860ccf97c57ee26502ff621cf4ed2
tree7bf97a3bbe38b6725eee2b9756870435e917f319
parent5cc2501136c7676c0fc9aabdb9a6c5b50bbe2e41
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
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/Sema/aarch64-sve-vector-log-ops.c [new file with mode: 0644]
clang/test/Sema/builtins-elementwise-math.c
clang/test/Sema/riscv-sve-vector-log-ops.c [new file with mode: 0644]
clang/test/SemaCXX/builtins-elementwise-math.cpp