[PATCH] D117760: [LegalizeTypes][VP] Add splitting support for vp.gather and vp.scatter

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 20 04:10:34 PST 2022


frasercrmck added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2010
+  SDValue MaskLo, MaskHi;
+  if (Mask.getOpcode() == ISD::SETCC) {
+    SplitVecRes_SETCC(Mask.getNode(), MaskLo, MaskHi);
----------------
Is it possible to test this case?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2354
+    break;
   case ISD::MGATHER:
     Res = SplitVecOp_MGATHER(cast<MaskedGatherSDNode>(N), OpNo);
----------------
I think we should also have to split `VP_GATHER` operands, much like `MGATHER` here.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:3038
+  SDValue MaskLo, MaskHi;
+  if (OpNo == 1 && Mask.getOpcode() == ISD::SETCC) {
+    SplitVecRes_SETCC(Mask.getNode(), MaskLo, MaskHi);
----------------
And test this, if possible.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117760



More information about the llvm-commits mailing list