[PATCH] D131718: [HLSL] Add abs library function
Xiang Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 11 13:52:39 PDT 2022
python3kgae added inline comments.
================
Comment at: clang/lib/Headers/hlsl/hlsl_intrinsics.h:17
+__attribute__((clang_builtin_alias(__builtin_labs))) int64_t abs(int64_t In);
+__attribute__((clang_builtin_alias(__builtin_fabsf))) float abs(float In);
+__attribute__((clang_builtin_alias(__builtin_fabs))) double abs(double In);
----------------
How to add 16bit abs?
Something like this?
#ifdef __HLSL_ENABLE_16_BIT
__attribute__((clang_builtin_alias(__builtin_fabsf16))) half abs(half In);
#endif
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131718/new/
https://reviews.llvm.org/D131718
More information about the cfe-commits
mailing list