[PATCH] D124595: [HLSL] Add llvm intrinsic for HLSL.

Xiang Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 27 22:40:12 PDT 2022


python3kgae created this revision.
python3kgae added reviewers: simoll, k-ishizaka, kaz7.
Herald added subscribers: Anastasia, dexonsmith, hiraditya, mgorny.
Herald added a project: All.
python3kgae requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, jdoerfert.
Herald added projects: clang, LLVM.

A directx specific llvm intrinsic is introduced:

  float @llvm.dx.sin.f32(float)

It is for https://github.com/Microsoft/DirectXShaderCompiler/blob/master/docs/DXIL.rst#sin.
This change the llvm intrinsic and test it can be generated from clang codeGen.
The clang builtin change is in https://reviews.llvm.org/D124593


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124595

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/test/CodeGenHLSL/Builtins/sin_f32.hlsl
  clang/test/SemaHLSL/Builtins/sin_f32.hlsl
  llvm/include/llvm/IR/CMakeLists.txt
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/llvm/IR/IntrinsicsDirectX.td
  llvm/lib/IR/Function.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124595.425696.patch
Type: text/x-patch
Size: 7217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220428/1439fa41/attachment.bin>


More information about the cfe-commits mailing list