Page MenuHomePhabricator

WIP: Builtins: Start adding half versions of math builtins
ClosedPublic

Authored by arsenm on Aug 1 2019, 12:00 PM.

Details

Summary

The implementation of the OpenCL builtin currently library uses 2 different hacks to get to the corresponding IR intrinsics from the source. This will allow removal of those.

I'm not sure this is the right naming scheme, but tries to follow the
single character suffix like f/l. This is a problem for sin/cos, since
__builtin_sinh already means double sinh etc. Another alternative might be _f16

Diff Detail

Event Timeline

arsenm created this revision.Aug 1 2019, 12:00 PM

In N2405 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2405.pdf), these are called truncf16, cosf16, etc., which I think is appropriate.

arsenm updated this revision to Diff 213276.Aug 4 2019, 8:11 PM

Change naming scheme, add more and tests

This revision is now accepted and ready to land.Aug 5 2019, 11:56 AM
arsenm closed this revision.Aug 5 2019, 8:27 PM

r367973