[PATCH] D118920: [DAGCombiner] Fold `ty1 extract_vector(ty2 splat(V)) -> ty1 splat(V)`

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 4 08:25:56 PST 2022


frasercrmck added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:21022
+  // ty1 extract_vector(ty2 splat(V))) -> t1 splat(V)
+  if (NVT.isScalableVector() == V.getValueType().isScalableVector() &&
+      V.getOpcode() == ISD::SPLAT_VECTOR)
----------------
I'm wondering, do we really need both to be equally scalable? Or is this just to avoid introducing a fixed-length SPLAT_VECTOR which we don't have great support for? If it's a "workaround" of that sort, might be worth commenting.


================
Comment at: llvm/test/CodeGen/RISCV/rvv/vadd-vp.ll:1575
 
 ; FIXME: We don't catch this as unmasked.
 
----------------
We can remove this FIXME.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118920



More information about the llvm-commits mailing list