[PATCH] D107597: [DAG] Fold concat_vectors(concat_vectors(x,y),concat_vectors(a,b)) -> concat_vectors(x,y,a,b)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 16 06:04:40 PDT 2021
- Previous message: [PATCH] D107597: [DAG] Fold concat_vectors(concat_vectors(x,y),concat_vectors(a,b)) -> concat_vectors(x,y,a,b)
- Next message: [PATCH] D107597: [DAG] Fold concat_vectors(concat_vectors(x,y),concat_vectors(a,b)) -> concat_vectors(x,y,a,b)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
lebedev.ri accepted this revision.
lebedev.ri added a comment.
LGTM
I think we may also want some variation of `concat(bitcast(vty0 to vty1), bitcast(vty0 to vty1))`?
`combineConcatVectorOfScalars()` does that, but only for non-vector source type.
================
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,
----------------
RKSimon wrote:
> 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.
Err, right, i read that wrong, sorry.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107597/new/
https://reviews.llvm.org/D107597
- Previous message: [PATCH] D107597: [DAG] Fold concat_vectors(concat_vectors(x,y),concat_vectors(a,b)) -> concat_vectors(x,y,a,b)
- Next message: [PATCH] D107597: [DAG] Fold concat_vectors(concat_vectors(x,y),concat_vectors(a,b)) -> concat_vectors(x,y,a,b)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list