This is an archive of the discontinued LLVM Phabricator instance.

[VP] ISD helper functions [VE] isel for vp_add, vp_and
ClosedPublic

Authored by simoll on Dec 23 2020, 8:06 AM.

Details

Summary

This implements vp_add, vp_and for the VE target by lowering them to the VVP_* layer. We also add helper functions for VP SDNodes (isVPSDNode, getVPMaskIdx, getVPExplicitVectorLengthIdx).

Diff Detail

Event Timeline

simoll created this revision.Dec 23 2020, 8:06 AM
simoll requested review of this revision.Dec 23 2020, 8:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 23 2020, 8:06 AM

In case you were wondering, the ISD helper functions are stapled to this VE patch to make a nice testable unit.

kaz7 added a comment.Dec 25 2020, 4:11 AM

I think we need more reviewer working on not only VVP but also VP to review this patch.

We want somebody that has reviewed VP patches before to review the VP bits of this (getters, really). @kaz7 takes care of the VE parts. Thanks!

LGTM. Had to double-check that things were #undef...fed at the end of the header.

simoll added a comment.Jan 8 2021, 3:00 AM

LGTM. Had to double-check that things were #undef...fed at the end of the header.

Awesome! Thanks for the quick reply :)

kaz7 accepted this revision.Jan 8 2021, 4:46 AM

LGTM also.

Two things to be improved in future:

  1. I still think it's better to have #define and #undef at caller side to avoid that reviewer look at the end of header files every time.
  2. It's better to use Opc or OPC instead of OC since it confuse me little bit each time. e.g. OC, OCOpt, and VVPOC variables are confusing me.
This revision is now accepted and ready to land.Jan 8 2021, 4:46 AM
simoll updated this revision to Diff 315350.EditedJan 8 2021, 4:58 AM

NFC. Rebased. Use variable name Opcode instead of OC.

This revision was landed with ongoing or failed builds.Jan 8 2021, 5:30 AM
This revision was automatically updated to reflect the committed changes.