[PATCH] D126275: [LegalizeTypes][VP] Add integer promote support for vp.gather and vp.scatter

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 01:10:58 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:2128
+  if (OpNo == 5) {
+    // The Mask
+    EVT DataVT = N->getValue().getValueType();
----------------
Jimerlife wrote:
> craig.topper wrote:
> > Do we need to promote index and mask for gather?
> > 
> > We don't seem to be testing index and mask promotion for scatter.
> Now I couldn't write index and mask promotion test in RISCV. I think index and mask promotion are unnecessary to RISCV. I add PromoteIntOp_VP_SCATTER with reference to PromoteIntOp_MSCATTER.
Thinking about it. Does RISC-V even need the promote support for data? Shouldn’t the vectorizer be using isLegalMaskedGather from TTI?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126275



More information about the llvm-commits mailing list