[PATCH] D133737: [HLSL] [clang] Add vector version of abs for HLSL

Xiang Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 12 16:00:23 PDT 2022


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

Add vector version of abs as
__attribute__((clang_builtin_alias(__builtin_elementwise_abs)))
int2 abs (int2 );
__attribute__((clang_builtin_alias(__builtin_elementwise_abs)))
int3 abs (int3 );

To make this work.
Allowed custom type checking builtins to be recelareable.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133737

Files:
  clang/lib/Basic/Builtins.cpp
  clang/lib/Headers/hlsl/hlsl_intrinsics.h
  clang/test/CodeGenHLSL/builtins/abs.hlsl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133737.459583.patch
Type: text/x-patch
Size: 10042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220912/6bde45f3/attachment-0001.bin>


More information about the cfe-commits mailing list