Page MenuHomePhabricator

[Power9] [LLVM] Add __float128 exponent GET and SET builtins

Authored by stefanp on Jun 14 2018, 11:58 AM.





Builtins should behave the same way as in GCC.

Diff Detail


Event Timeline

stefanp created this revision.Jun 14 2018, 11:58 AM
lei added inline comments.Jun 26 2018, 9:04 AM
2634 ↗(On Diff #151395)

indent by 2 here.

93 ↗(On Diff #151395)


Can you put a link in the description of the patch as to where the GCC builtins are documented (if such a document exists). The naming seems inconsistent and I don't see it at

I looked into the naming of those builtins.
GCC does document the overloaded versions of those functions:
scalar_extract_exp for __builtin_vsx_scalar_extract_expq
scalar_insert_exp for __builtin_vsx_scalar_insert_exp_qp

We could add wrappers to these builtins the way that they do or we could (at least for now) just put in the __builtin versions.

nemanjai requested changes to this revision.Aug 13 2018, 7:40 AM
nemanjai added inline comments.
93 ↗(On Diff #151395)

Not only that, but we should check that the sequence with the register move is part of the emitted sequence (both tests).

This revision now requires changes to proceed.Aug 13 2018, 7:40 AM
stefanp updated this revision to Diff 164737.Sep 10 2018, 1:24 PM

Update patch based on reviewer comments.

This revision is now accepted and ready to land.Sep 11 2018, 10:55 AM
This revision was automatically updated to reflect the committed changes.