Add codegen for llvm exp/exp2 elementwise builtins
authorJoshua Batista <jbatista@microsoft.com>
Thu, 9 Mar 2023 19:31:31 +0000 (11:31 -0800)
committerJoshua Batista <jbatista@microsoft.com>
Thu, 9 Mar 2023 20:14:59 +0000 (12:14 -0800)
commit4c82050c56926d840e4ccf253ad10e6ae3ee6cc7
tree03dc24d37cc1f340260f3b559d83805f8c2d991c
parent5288d84562cb689df8149d2f82f14b3bc00578e9
Add codegen for llvm exp/exp2 elementwise builtins

Add codegen for llvm exp/exp2 elementwise builtin
The exp/exp2 elementwise builtins are 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/D145270
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-exp-ops.c [new file with mode: 0644]
clang/test/Sema/builtins-elementwise-math.c
clang/test/Sema/riscv-sve-vector-exp-ops.c [new file with mode: 0644]
clang/test/SemaCXX/builtins-elementwise-math.cpp