[PATCH] D138393: HIP: Directly call fabs builtins

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 20 20:45:26 PST 2022


arsenm created this revision.
arsenm added reviewers: b-sumner, JonChesterfield, yaxunl.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.

All the attribute numbering changes are due to the ocml function being
assumed convergent, and the direct call is not.

     

This begins a series of patches to avoid using the thinnest
ocml wrappers around llvm intrinsics. These wrapper functions
aren't buying anything and add complexity. As we do not propagate
fast math flags into the library on linking, and cannot generally
safely do so, we're losing information by calling into them. Directly
call the builtins so we get the fast math flags set appropriate for the
translation unit naturally.


https://reviews.llvm.org/D138393

Files:
  clang/lib/Headers/__clang_hip_math.h
  clang/test/Headers/__clang_hip_math.hip

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138393.476798.patch
Type: text/x-patch
Size: 177593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221121/344ce4d8/attachment-0001.bin>


More information about the cfe-commits mailing list