[all-commits] [llvm/llvm-project] 18385c: [HLSL] Add abs library function

Chris B via All-commits all-commits at lists.llvm.org
Thu Aug 25 17:02:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 18385cffc50a6e549dcf3306cbe8a99e10a11fff
      https://github.com/llvm/llvm-project/commit/18385cffc50a6e549dcf3306cbe8a99e10a11fff
  Author: Chris Bieneman <chris.bieneman at me.com>
  Date:   2022-08-25 (Thu, 25 Aug 2022)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Headers/hlsl/hlsl_intrinsics.h
    A clang/test/CodeGenHLSL/builtins/abs.hlsl

  Log Message:
  -----------
  [HLSL] Add abs library function

This change exposes the abs library function for HLSL scalar types. Abs
is supported for all scalar, vector and matrix types. This patch only
adds a subset of scalar type support.

Fixes #57100 (https://llvm.org/pr57100)

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

Reviewed By: bogner

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




More information about the All-commits mailing list