Add codegen for llvm log2/log10 elementwise builtins
authorJoshua Batista <jbatista@microsoft.com>
Tue, 7 Feb 2023 19:26:08 +0000 (11:26 -0800)
committerJoshua Batista <jbatista@microsoft.com>
Tue, 7 Feb 2023 20:23:48 +0000 (12:23 -0800)
commit836249b1c2f0540ed0c886d6c3558b2f4f179249
treef2a019f32829bb253fc0461f5341c33c3d11e2be
parent056af487831fb573e6895901d1e48f93922f9635
Add codegen for llvm log2/log10 elementwise builtins

Add codegen for llvm log2 / log10 elementwise builtin
The log2/log10 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 builtins are restricted to floating point types only.

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D143207
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
clang/test/Sema/builtins-elementwise-math.c
clang/test/Sema/riscv-sve-vector-log-ops.c
clang/test/SemaCXX/builtins-elementwise-math.cpp