This change exposes the abs library function for HLSL scalar types. Abs
is supported for all scalar, vector and matrix types. This patch only
adds a subset of scalar type support.
Fixes #57100 (https://llvm.org/pr57100)
The full documentation of the HLSL abs function is available here:
https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-abs
How to add 16bit abs?
Something like this?
#ifdef HLSL_ENABLE_16_BIT
attribute((clang_builtin_alias(builtin_fabsf16))) half abs(half In);
#endif