[PATCH] D124813: [HLSL] Add clang builtin for HLSL.
Xiang Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 2 16:28:28 PDT 2022
python3kgae created this revision.
python3kgae added reviewers: anakryiko, ast, yonghong-song, beanz, pow2clk.
Herald added a subscriber: Anastasia.
Herald added a project: All.
python3kgae requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Two directx specific clang builtins are introduced:
unsigned __builtin_dx_umax_i3232(unsigned, unsigned);
unsigned __builtin_dx_umin_i3232(unsigned, unsigned);
They're for https://github.com/Microsoft/DirectXShaderCompiler/blob/master/docs/DXIL.rst#umax and
https://github.com/Microsoft/DirectXShaderCompiler/blob/master/docs/DXIL.rst#umini.
These 2 builtins are translated into llvm umax/umin intrinsic in clang codeGen.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124813
Files:
clang/include/clang/Basic/BuiltinsDirectX.def
clang/include/clang/Basic/TargetBuiltins.h
clang/lib/Basic/Targets/DirectX.cpp
clang/lib/Basic/Targets/DirectX.h
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/test/CodeGenHLSL/umax_umin.hlsl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124813.426543.patch
Type: text/x-patch
Size: 6081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220502/3aa12d58/attachment.bin>
More information about the cfe-commits
mailing list