[PATCH] D47775: [AArch64][SVE] Add SPLAT_VECTOR ISD Node

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 01:35:03 PDT 2019


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:17516
+    if (SDValue V = (cast<BuildVectorSDNode>(N))->getSplatValue())
+      if (!V.isUndef())
+        return DAG.getNode(ISD::SPLAT_VECTOR, SDLoc(N), VT, V);
----------------
jmolloy wrote:
> This is probably worth a comment. I suppose we don't convert if the splatted value is undef because the entire build_vector is undef and you haven't written all the canonicalizations for that?
This if() might be better as an assert - we have the ISD::allOperandsUndef(N) test earlier in visitBUILD_VECTOR.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D47775





More information about the llvm-commits mailing list