This is an archive of the discontinued LLVM Phabricator instance.

[HLSL] Add clang builtin for HLSL.
AbandonedPublic

Authored by python3kgae on May 2 2022, 4:28 PM.

Details

Summary

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.

Diff Detail

Event Timeline

python3kgae created this revision.May 2 2022, 4:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2022, 4:28 PM
Herald added a subscriber: Anastasia. · View Herald Transcript
python3kgae requested review of this revision.May 2 2022, 4:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2022, 4:28 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
yonghong-song resigned from this revision.May 4 2022, 9:10 PM

please having proper reviewers. Me, @anakryiko @ast are not the right persons to review this patch.

sameerds resigned from this revision.May 4 2022, 11:48 PM

I am not much familiar with DirectX and HLSL, so unable to review this patch. It might help to post on the Discourse under Clang Frontend:

https://discourse.llvm.org/c/clang/6

python3kgae abandoned this revision.Sep 14 2022, 10:21 AM