[PATCH] D107597: [DAG] Fold concat_vectors(concat_vectors(x,y),concat_vectors(a,b)) -> concat_vectors(x,y,a,b)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 16 05:48:49 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:19863-19864
+// Attempt to merge nested concat_vectors/undefs.
+// Fold concat_vectors(concat_vectors(x,y,z,w),u,u,concat_vectors(a,b,c,d))
+//  --> concat_vectors(x,y,z,w,u,u,u,u,u,u,u,u,a,b,c,d)
+static SDValue combineConcatVectorOfConcatVectors(SDNode *N,
----------------
lebedev.ri wrote:
> Does `concat_vectors` pad with undef?
> Or should this be
> ```
> //  --> concat_vectors(x,y,z,w,u,u,a,b,c,d)
> 
> ```
All subvector operands of concat_vectors are the same type, so undefs are 'split' to the new type - look at "SubVT" in the code below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107597



More information about the llvm-commits mailing list