[PATCH] D139137: add floor library function

Joshua Batista via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 1 12:36:14 PST 2022


bob80905 created this revision.
bob80905 added reviewers: python3kgae, beanz.
Herald added a subscriber: Anastasia.
Herald added a project: All.
bob80905 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This change exposes the floor library function for HLSL,
excluding long, int, and long long doubles.
Floor is supported for all scalar, vector, and matrix types.

Long and long long double support is missing in this patch because those types
don't exist in HLSL. Int is missing because the floor function only works on floating type arguments.

The full documentation of the HLSL floor function is available here:
https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-floor


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139137

Files:
  clang/lib/Headers/hlsl/hlsl_intrinsics.h
  clang/test/CodeGenHLSL/builtins/floor.hlsl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139137.479386.patch
Type: text/x-patch
Size: 4732 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221201/81b33a25/attachment-0001.bin>


More information about the cfe-commits mailing list