This is an archive of the discontinued LLVM Phabricator instance.

[PPC] Add intrinsic mapping to the xscvhpsp instruction (VSX Scalar Convert Half-Precision to Single-Precision)
ClosedPublic

Authored by sfertile on Nov 10 2016, 6:19 PM.

Details

Summary

Adds a new intrinsic mapping to the xscvhpsp instruction.
A separate pattern has to be used for the match so that the argument can be converted from a VRRC register type to a VSRC register type.

Diff Detail

Repository
rL LLVM

Event Timeline

sfertile updated this revision to Diff 77584.Nov 10 2016, 6:19 PM
sfertile retitled this revision from to [PPC] Add intrinsic mapping to the xscvhpsp instruction (VSX Scalar Convert Half-Precision to Single-Precision).
sfertile updated this object.
sfertile set the repository for this revision to rL LLVM.
sfertile added subscribers: llvm-commits, echristo.
kbarton accepted this revision.Nov 11 2016, 1:48 PM
kbarton edited edge metadata.

LGTM

This revision is now accepted and ready to land.Nov 11 2016, 1:48 PM
nemanjai added inline comments.Nov 13 2016, 7:06 PM
lib/Target/PowerPC/PPCInstrVSX.td
2155

I am slightly surprised that tblgen is able to infer all the types for this output pattern. However, can you please explicitly specify the output type, if for no other reason but consistency with the rest of the anonymous patterns in this file. Something like:
(v4f32 (XVCVHPSP (COPY_TO_REGCLASS $A, VSRC)))

sfertile updated this revision to Diff 77846.Nov 14 2016, 11:25 AM
sfertile edited edge metadata.

Updated the pattern expansion to include the explicit type.

sfertile marked an inline comment as done.Nov 14 2016, 11:27 AM
sfertile added inline comments.
lib/Target/PowerPC/PPCInstrVSX.td
2155

Fixed

sfertile closed this revision.Nov 14 2016, 7:45 PM
sfertile marked an inline comment as done.

Committed in revision 286862