[PATCH] D127710: [SelectionDAG] Enable WidenVecOp_VECREDUCE_SEQ for scalable vector

WangLian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 07:45:47 PDT 2022


Jimerlife added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:6153
+    unsigned GCD = greatestCommonDivisor(OrigElts, WideElts);
+    EVT SplatVT = EVT::getVectorVT(*DAG.getContext(), ElemVT,
+                                   ElementCount::getScalable(GCD));
----------------
sdesmalen wrote:
> For SVE there is still the problem that the type action of SplatVT may be `TypeWiden` as well, because we haven't implemented all support for nxv1 types yet. The approach taken here seems valid though, it just means that we can't have the same tests for SVE yet.
Should I need to add `getTypeAction(SplatVT) != TargetLowering::TypeWidenVector` to avoid this problem now?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127710



More information about the llvm-commits mailing list