[ARM] Expand types handled in VQDMULH recognition
authorDavid Green <david.green@arm.com>
Thu, 15 Jul 2021 13:47:53 +0000 (14:47 +0100)
committerDavid Green <david.green@arm.com>
Thu, 15 Jul 2021 13:47:53 +0000 (14:47 +0100)
commitdad506bd4e27b52e671a8b927320845732e1e073
tree222c33c0d197edc87c9f314709fbbba590934178
parent5d7632ee72c51b518bde17e385b71c5d3f0d2560
[ARM] Expand types handled in VQDMULH recognition

We have a DAG combine for recognizing the sequence of nodes that make up
an MVE VQDMULH, but only currently handles specifically legal types.
This patch expands that to other power-2 vector types. For smaller than
legal types this means any_extending the type and casting it to a legal
type, using a VQDMULH where we only use some of the lanes. The result is
sign extended back to the original type, to properly set the invalid
lanes. Larger than legal types are split into chunks with extracts and
concat back together.

Differential Revision: https://reviews.llvm.org/D105814
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/mve-vqdmulh.ll