This is an archive of the discontinued LLVM Phabricator instance.

[Power9] Implement new vector compare, extract, insert instructions
ClosedPublic

Authored by cycheng on Jan 5 2016, 11:47 PM.

Details

Summary

This change implements the following vector operations:

  • Vector Compare Not Equal
    1. vcmpneb(.) vcmpneh(.) vcmpnew(.)
    2. vcmpnezb(.) vcmpnezh(.) vcmpnezw(.)
  • Vector Extract Unsigned
    1. vextractub vextractuh vextractuw vextractd
    2. vextublx vextubrx vextuhlx vextuhrx vextuwlx vextuwrx
  • Vector Insert
    1. vinsertb vinserth vinsertw vinsertd

26 instructions.

Diff Detail

Event Timeline

cycheng updated this revision to Diff 44095.Jan 5 2016, 11:47 PM
cycheng retitled this revision from to [Power9] Implement new vector compare instructions.
cycheng updated this object.
cycheng added reviewers: hfinkel, kbarton, tjablin.
cycheng added a subscriber: llvm-commits.

These instructions definitely need intrinsics, a way to get at them through altivec.h and support in PPCISelLowering.cpp (getVectorCompareInfo). Of course, we are only doing the ASM support at this time, but I think this would be the right time to put a note somewhere about what else is needed for these instructions. Perhaps a file named along the lines of P9AdditionalSupportReq.txt in lib/Target/PowerPC/.

cycheng updated this revision to Diff 44639.Jan 12 2016, 7:35 AM
  • Use single predicate for power9
  • Remove all intrinsics, we will implement them after finish *P9* assembler/disassembler support
cycheng updated this revision to Diff 45951.Jan 26 2016, 12:36 AM
cycheng retitled this revision from [Power9] Implement new vector compare instructions to [Power9] Implement new vector compare, extract, insert instructions.
cycheng updated this object.
cycheng added a reviewer: nemanjai.
cycheng removed a subscriber: nemanjai.
kbarton accepted this revision.Jan 27 2016, 10:33 AM
kbarton edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jan 27 2016, 10:33 AM
cycheng updated this revision to Diff 49177.Feb 26 2016, 6:06 AM
cycheng edited edge metadata.

Write README_P9.txt for conforming the discipline we have discussed in http://reviews.llvm.org/D16842#344765

cycheng updated this revision to Diff 49338.Feb 28 2016, 7:21 PM

Rebase against llvm revision r262104 (Feb 27 2016)

kbarton closed this revision.Mar 1 2016, 12:57 PM

Committed r262392