This is an archive of the discontinued LLVM Phabricator instance.

[Power9] Add __float128 builtins for Round To Odd
ClosedPublic

Authored by stefanp on May 30 2018, 11:51 AM.

Details

Summary

Add a number of builtins for __float128 Round To Odd.
This is the LLVM portion of the builtins work.

GCC has builtins for these round to odd instructions:

__float128 __builtin_sqrtf128_round_to_odd (__float128)
__float128 __builtin_{add,sub,mul,div}f128_round_to_odd (__float128, __float128)
__float128 __builtin_fmaf128_round_to_odd (__float128, __float128, __float128)

Diff Detail

Event Timeline

stefanp created this revision.May 30 2018, 11:51 AM
lei added inline comments.May 30 2018, 2:07 PM
lib/Target/PowerPC/PPCInstrVSX.td
2441

It's kind of hard to read... any reason why you separate f128 from ":$vt"? I would think they should be kept together as it indicates that $vT is of type f128.
In general variables and their type are kept together eg. set f128:$vT

2443

same as above for all the patterns.

2485

Why is this an anonymous pattern as oppose to the default pattern for XSMADDQPO? That is what you did for all the other ones ...

Other than the formatting issues that Lei identified (and some issues with commas that separate operands not being followed by spaces), this seems fine to me. However, a couple of suggestions:

  • Find a reviewer for the target-independent stuff (perhaps from CODE_OWNERS.txt).
  • Add a note in the patch description about any documentation of these builtins from GCC and any other compilers
  • Actually link the patch dependencies in Phabricator between the clang and LLVM portions
stefanp updated this revision to Diff 149336.May 31 2018, 12:10 PM

Fixed some of the style issues.

@lattner
Added Chris Lattner as a reviewer in case I did something silly in the target indep code.

lei added a comment.Jun 18 2018, 9:01 PM

The indentation in the td files are still wrong. You should take a look at the existing pattern indentations and follow ...

nemanjai accepted this revision.Jul 4 2018, 7:49 AM

LGTM.

This revision is now accepted and ready to land.Jul 4 2018, 7:49 AM
This revision was automatically updated to reflect the committed changes.