[PATCH] D23330: [DAGCombine] Avoid INSERT_SUBVECTOR reinsertions (PR28678)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 10 04:09:19 PDT 2016
RKSimon added a comment.
In https://reviews.llvm.org/D23330#510591, @mkuper wrote:
> Although I'm somewhat curious about how we even end up with this pattern - I guess for test_mm256_insert_epi64, we really need to have two insert_elements post-legalization, but why do we end up with two insert_subvectors?
Thanks, I've cleaned up the description by using pseudocode instead. I also realised that we need to check the subvector types are the same (e.g. to protect against inserting a 256 following by 128 into a 512).
Any time that we're doing partial insertions (i.e. something that build vector won't handle) we tend to end up with these cases - each insertion has a separate extractsub/insertelt/insertsub pattern - what's curious is that a common extractsub is being used.
If you notice for the lower 128-bit vectors we still have a lot of duplicate blends to bring the lower/upper halves back together again.
Repository:
rL LLVM
https://reviews.llvm.org/D23330
More information about the llvm-commits
mailing list