[PATCH] D134921: [HLSL] add cos library function

Xiang Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 29 16:52:17 PDT 2022


python3kgae added inline comments.


================
Comment at: clang/test/CodeGenHLSL/builtins/cos.hlsl:11
+// NO_HALF: define noundef float @"?test_cos_half@@YA$halff@$halff@@Z"(
+// NO_HALF: call noundef float @"?cos@@YAMM at Z"(float noundef %0)
+half test_cos_half ( half p0 ) {
----------------
We want to lower it into llvm::Intrinsic::cos.

You can add it in CodeGenFunction::EmitBuiltinExpr like how elementwise_ceil is lowered.
And add people who did the elementwise_ceil work to review. Better create another PR.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134921/new/

https://reviews.llvm.org/D134921



More information about the cfe-commits mailing list