[all-commits] [llvm/llvm-project] 500e72: add floor library function

Joshua Batista via All-commits all-commits at lists.llvm.org
Thu Dec 8 15:42:28 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 500e72924305c4a1fac2ffd45b16114d49c3a7d2
      https://github.com/llvm/llvm-project/commit/500e72924305c4a1fac2ffd45b16114d49c3a7d2
  Author: Joshua Batista <jbatista at microsoft.com>
  Date:   2022-12-08 (Thu, 08 Dec 2022)

  Changed paths:
    M clang/lib/Headers/hlsl/hlsl_intrinsics.h
    A clang/test/CodeGenHLSL/builtins/floor.hlsl

  Log Message:
  -----------
  add floor library function

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

Reviewed By: beanz

Differential Revision: https://reviews.llvm.org/D139137




More information about the All-commits mailing list