[AArch64] Alter mull buildvectors(ext(..)) combine to work on shuffles
authorDavid Green <david.green@arm.com>
Mon, 4 Apr 2022 22:07:47 +0000 (23:07 +0100)
committerDavid Green <david.green@arm.com>
Mon, 4 Apr 2022 22:07:47 +0000 (23:07 +0100)
commit3b9833597e810d4c485487d2f094a8e223af5548
treefa872b0f5eee6a9c4c8c77b5452c39925f122f09
parenta70480dd13c3317f4f9e2f55dc9d67dfb61d8218
[AArch64] Alter mull buildvectors(ext(..)) combine to work on shuffles

D120018 altered this combine to work on buildvectors as opposed to
shuffle dup's. This works well for dups and other things that are
expanded into buildvectors. Some shuffles are legal though, and stay as
vector_shuffle through lowering. This expands the transform to also
handle shuffles, so that we can turn mul(shuffle(sext into
mul(sext(shuffle and more readily make smull/umull instructions. This
can come up from the SLP vectorizer adding shuffles that are costed from
extends.

Differential Revision: https://reviews.llvm.org/D123012
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/aarch64-dup-ext.ll