This is an archive of the discontinued LLVM Phabricator instance.

Add support for VSX FMA single-precision instructions to the PPC back end
ClosedPublic

Authored by nemanjai on May 22 2015, 11:30 AM.

Details

Summary

This patch adds the floating point multiply-add instructions. Double precision variants already exist, single precision variants added in ISA 2.07. he following instructions are added:
xsmaddasp
xsmaddmsp
xsmsubasp
xsmsubmsp
xsnmaddasp
xsnmaddmsp
xsnmsubasp
xsnmsubmsp

Diff Detail

Repository
rL LLVM

Event Timeline

nemanjai updated this revision to Diff 26333.May 22 2015, 11:30 AM
nemanjai retitled this revision from to Add support for VSX FMA single-precision instructions to the PPC back end.
nemanjai updated this object.
nemanjai edited the test plan for this revision. (Show Details)
nemanjai added reviewers: hfinkel, wschmidt, kbarton, seurer.
nemanjai set the repository for this revision to rL LLVM.
nemanjai added a subscriber: Unknown Object (MLST).
hfinkel edited edge metadata.May 22 2015, 11:35 AM

Please also include tests corresponding to those in test/CodeGen/PowerPC/vsx-fma-m.ll.

lib/Target/PowerPC/PPCInstrVSX.td
1093

This line is too long (please try to keep to 80 cols). Same is true for several lines below.

I will add those tests in the next review. I'll give it a bit of time to see if any other comments need to be addressed in the next review.

lib/Target/PowerPC/PPCInstrVSX.td
1093

OK, sorry I will fix it. I just copied the corresponding double precision ones.

wschmidt edited edge metadata.May 25 2015, 7:04 AM

No comments from me beyond what Hal has already raised.

nemanjai updated this revision to Diff 26512.May 26 2015, 7:29 AM
nemanjai edited edge metadata.

Added the missing test coverage outlined by Hal.
Also added some support for the single precision loads and stores to fast-isel as that test case involves a run with fast-isel.

The new fast-isel bits look fine to me. If Hal's comfortable with the new FMA tests, this should be ready to go.

hfinkel accepted this revision.May 27 2015, 11:34 AM
hfinkel edited edge metadata.

LGTM.

This revision is now accepted and ready to land.May 27 2015, 11:34 AM
nemanjai closed this revision.May 29 2015, 10:17 AM

Committed revision 238578.