[PATCH] D94525: [SVE][CodeGen] Remove performMaskedGatherScatterCombine

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 05:45:21 PST 2021


david-arm accepted this revision.
david-arm added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:1321
 
+  // Returns true if the index type for a masked gather/scatter requires
+  // extending
----------------
nit: Perhaps make these comments `///` instead for documentation support?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4347
+    EVT NewIdxVT = IdxVT.changeVectorElementType(EltTy);
+    Index = DAG.getNode(ISD::SIGN_EXTEND, sdl, NewIdxVT, Index);
+  }
----------------
kmclaughlin wrote:
> david-arm wrote:
> > Do we want to switch between zero, sign or any extend depending upon what the target wants? I noticed in the original perform...Combine code we chose SIGN or ZERO extend based on the isIndexSigned() result - not sure if we still need something similar here or not.
> Hi @david-arm, I chose sign extension here because the index type at this point is set to the default of `SIGNED_UNSCALED`. Though if the index here is a zext node, getNode() will return an `ISD::ZERO_EXTEND` instead, so I think the correct extension will still be applied.
OK, thanks a lot for looking into this!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94525



More information about the llvm-commits mailing list