This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Exploit the vinsw, vinsd, and vins[wd][lr]x instructions on P10
ClosedPublic

Authored by amyk on Jan 11 2021, 2:36 PM.

Details

Summary

This patch generates the vinsw, vinsd, vinsblx, vinshlx, vinswlx, vinsdlx, vinsbrx, vinshrx, vinswrx and vinsdrx instructions for vector insertion on P10.

Diff Detail

Event Timeline

bsaleil created this revision.Jan 11 2021, 2:36 PM
bsaleil requested review of this revision.Jan 11 2021, 2:36 PM
Conanap added inline comments.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
1237

should we be using Subtarget.isISA3_1() instead?

10056

Should we be using Subtarget.isISA3_1() here as well?

bsaleil updated this revision to Diff 317081.Jan 15 2021, 2:41 PM

Use isISA3_1 instead of hasP10Vector and add P9 run line in test case.

bsaleil marked 2 inline comments as done.Jan 15 2021, 2:42 PM
bsaleil added inline comments.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
1237

You're right, I changed that.

Conanap added inline comments.Feb 4 2021, 10:53 AM
llvm/lib/Target/PowerPC/PPCInstrPrefix.td
29

small nit: Put SDTCisVec<0>, on the next line with the rest to maintain the same style

amyk commandeered this revision.Feb 16 2021, 12:34 PM
amyk added a reviewer: bsaleil.
amyk added a subscriber: amyk.

Commandeering this patch.

stefanp accepted this revision as: stefanp.Feb 17 2021, 8:37 AM

I gave this patch a try and I can't see any concerns with it.
LGTM.

This revision is now accepted and ready to land.Feb 17 2021, 8:37 AM
This revision was automatically updated to reflect the committed changes.
amyk marked an inline comment as done.
amyk added inline comments.Feb 18 2021, 6:19 AM
llvm/lib/Target/PowerPC/PPCInstrPrefix.td
29

Addressed this comment on the commit.