[PATCH] D49248: [TargetLowering] Add support for non-uniform vectors to BuildUDIV

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 2 04:24:35 PDT 2018


RKSimon marked 3 inline comments as done.
RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:3567
+    if (VT.isVector()) {
+      Q = DAG.getVectorShuffle(VT, dl, Q, NPQ, ShuffleMask);
+      Created->push_back(Q.getNode());
----------------
RKSimon wrote:
> efriedma wrote:
> > I'm pretty sure this isn't the most efficient way to handle this case.  Would it be more efficient to use a variable-amount shift to compute NPQ, rather than shuffle afterwards?  Or is it possible to fudge the magic number to avoid the blend?
> > 
> > Please make sure you have test coverage for both UseNPQ=true and UseNPQ=false.
> We do have full coverage for scalars and uniform vectors only - I'll try to add all the necessary non-uniform cases as well.
Tests now ensure we have vector cases with all/none/some NPQ path


Repository:
  rL LLVM

https://reviews.llvm.org/D49248





More information about the llvm-commits mailing list