[PATCH] D107957: [LegalizeTypes][VP] Add splitting support for binary VP ops

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 20 07:08:46 PDT 2021


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM (with the addition of the half elts assertion)



================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1190
+  EVT EVLVT = EVL.getValueType();
+  unsigned HalfMinNumElts = VecVT.getVectorMinNumElements() / 2;
+  SDValue HalfNumElts =
----------------
frasercrmck wrote:
> RKSimon wrote:
> > Should we need to assert this isKnownEven like we do in EVT::getHalfNumVectorElementsVT ?
> I was unsure. For some reason I was under the impression that `SplitVecRes_BinOp` and splitting in general could only be called on even-sized vectors. And because `VecVT` is the result type of the split node in question, we know it's even. Is that not the case?
I think an assert will do no harm and will show we've at least thought about it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107957/new/

https://reviews.llvm.org/D107957



More information about the llvm-commits mailing list