This is an archive of the discontinued LLVM Phabricator instance.

clang/HIP: Inline frexp/frexpf implementations
ClosedPublic

Authored by arsenm on Nov 21 2022, 10:10 PM.

Details

Summary

Don't bother calling ocml. This stops setting the
appropriate fast math flags, and requires this junk
for passing to a private pointer.

Diff Detail

Event Timeline

arsenm created this revision.Nov 21 2022, 10:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 21 2022, 10:10 PM
arsenm requested review of this revision.Nov 21 2022, 10:10 PM
JonChesterfield accepted this revision.Nov 22 2022, 1:21 AM

Noisy diff! Getting rid of the openmp special case handling here is nice.

This revision is now accepted and ready to land.Nov 22 2022, 1:21 AM

Are you sure these functions are equivalent? we do not have a comprehensive test for these functions regarding accuracy.

Are you sure these functions are equivalent? we do not have a comprehensive test for these functions regarding accuracy.

These are ultimately simple bit extracts. The library implementation just calls these intrinsics. The only difference from the current library code and here is a check to handle infinities and nans, which the ISA manual suggests is unnecessary. I have another patch to eliminate the check there

arsenm added a comment.Jun 6 2023, 2:50 PM

After D149716 this can switch to use the new builtin, and thus restores the ye olde southern islands workaround