[all-commits] [llvm/llvm-project] b95c57: [HLSL] add sqrt library function

Joshua Batista via All-commits all-commits at lists.llvm.org
Tue Sep 20 13:42:45 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b95c57444a8ac3f81bc33a3d52d0f88b7a592a2f
      https://github.com/llvm/llvm-project/commit/b95c57444a8ac3f81bc33a3d52d0f88b7a592a2f
  Author: Joshua Batista <jbatista at microsoft.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

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

  Log Message:
  -----------
  [HLSL] add sqrt library function

This change exposes the sqrt library function for HLSL scalar types,
excluding long and long long doubles. Sqrt is supported for all scalar, vector,
and matrix types. This patch only adds a subset of scalar type support.

Long and long long double support is missing in this patch because that type
doesn't exist in HLSL.

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

Reviewed By: beanz

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




More information about the All-commits mailing list