This is an archive of the discontinued LLVM Phabricator instance.

[Power9]Legalize and emit code for quad-precision fma instructions
ClosedPublic

Authored by lei on Mar 23 2018, 12:40 PM.

Details

Summary

Legalize and emit code for the following quad-precision fma:

  • xsmaddqp
  • xsnmaddqp
  • xsmsubqp
  • xsnmsubqp

Diff Detail

Repository
rL LLVM

Event Timeline

lei created this revision.Mar 23 2018, 12:40 PM
nemanjai added inline comments.Mar 26 2018, 5:29 AM
lib/Target/PowerPC/PPCISelLowering.cpp
13755 ↗(On Diff #139637)

This is only true if Subtarget.hasP9Vector(), so return that for the f128 case.

lib/Target/PowerPC/PPCInstrVSX.td
2441 ↗(On Diff #139637)

Something seems very wrong with the formatting here.

test/CodeGen/PowerPC/f128-fma.ll
15 ↗(On Diff #139637)

The order of operands here matters, so we'll need to be able to test which registers the values are loaded into so that the correct order of operands can be ensured with these FMA instructions.

lei updated this revision to Diff 140177.Mar 28 2018, 7:06 PM

Addressed comments from previous review.

lei marked 3 inline comments as done.Mar 28 2018, 7:07 PM
lei added a reviewer: nemanjai.Apr 3 2018, 4:54 PM
lei removed a subscriber: nemanjai.
nemanjai accepted this revision.Apr 4 2018, 4:30 AM

LGTM.

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