[AArch64] Add tablegen patterns for faddp of two extracts
authorDavid Green <david.green@arm.com>
Mon, 19 Jun 2023 06:48:31 +0000 (07:48 +0100)
committerDavid Green <david.green@arm.com>
Mon, 19 Jun 2023 06:48:31 +0000 (07:48 +0100)
commit68f34e4d39690cb22f11269a128cae420feaf212
tree0892997bf4358667d62beac4a723a18d46d4f8de
parent18eb31c096167a1f6185f05338494c82a509ff9e
[AArch64] Add tablegen patterns for faddp of two extracts

This adds some simple tablegen patterns for converting
`faddp v2f32 extractlow(Rn), v2f32 extracthigh(Rn)` to
`faddp v4f32 Rn, v4f32 Rn` using the q variants of the
instructions, avoiding the extra ext needed to extract
the high lanes. Only the bottom lanes of the new faddp
are used, the second Rn operand is used as a placeholder.
It uses Rn to prevent any false dependencies, but could
equally by undef.

Differential Revision: https://reviews.llvm.org/D152245
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/test/CodeGen/AArch64/faddp.ll