This is an archive of the discontinued LLVM Phabricator instance.

[clang][Interp] Implement __builtin_fpclassify
ClosedPublic

Authored by tbaeder on Jul 16 2023, 1:22 AM.

Diff Detail

Event Timeline

tbaeder created this revision.Jul 16 2023, 1:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2023, 1:22 AM
tbaeder requested review of this revision.Jul 16 2023, 1:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2023, 1:22 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman added inline comments.
clang/test/AST/Interp/builtin-functions.cpp
121–130

One thing we should test is that promotion does not happen on the final argument (converting it from float to double) -- @jcranmer-intel can you think of a good way to test that in this case?

clang/test/AST/Interp/builtin-functions.cpp
121–130

A subnormal float would be a normal double, so using 1.0e-38f should classify as a denormal and not a normal numal.

tbaeder updated this revision to Diff 543854.Jul 25 2023, 12:14 AM
This revision is now accepted and ready to land.Jul 25 2023, 6:38 AM
tbaeder closed this revision.Aug 1 2023, 7:04 AM

Dang, forgot to add the link to the commit message. This has been closed via https://github.com/llvm/llvm-project/commit/6ba4b213346fad36634a5571feda4f4481097c3a

This revision was landed with ongoing or failed builds.Aug 1 2023, 7:15 AM