This is an archive of the discontinued LLVM Phabricator instance.

clang/HIP: Add new header test for math IR gen
ClosedPublic

Authored by arsenm on Nov 20 2022, 8:41 PM.

Details

Summary

The current header testing is pretty thin. This is in
preparation for a series of patches to replace many
builtin implementations.

I did try to stress everything in this header, but skipped
a few things. Mostly I didn't understand why we have
various language version checks which skip defining some
things. It doesn't seem right to have any of these if guards
on cplusplus, HIPCC_RTC, and OPENMP_AMDGCN__.

Diff Detail

Event Timeline

arsenm created this revision.Nov 20 2022, 8:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 20 2022, 8:41 PM
Herald added a subscriber: kosarev. · View Herald Transcript
arsenm requested review of this revision.Nov 20 2022, 8:41 PM
arsenm updated this revision to Diff 477060.Nov 21 2022, 9:51 PM

Missed frexp

JonChesterfield accepted this revision.Nov 22 2022, 1:25 AM

Good call adding this test, thanks.

I think some of the skipping is glibc quirk related and some was to avoid clobbering the user's namespace for openmp. The math header defines various functions at global scope which can collide with user symbols. In practice that may not be a big deal.

This revision is now accepted and ready to land.Nov 22 2022, 1:25 AM
yaxunl accepted this revision.Nov 22 2022, 7:16 AM

LGTM. Thanks.