[AArch64] Convert vector add(ext, ext) into ext(add(ext, ext))
authorDavid Green <david.green@arm.com>
Fri, 24 Jun 2022 09:04:28 +0000 (10:04 +0100)
committerDavid Green <david.green@arm.com>
Fri, 24 Jun 2022 09:04:28 +0000 (10:04 +0100)
commit03c65c0d3209d11966a312df3d41f8b0d5aded80
tree457372cc71a7941116bd7488d1e4437c22b1f41b
parentbcadfc2595ba25e77145fc8d9f57981ac52b9348
[AArch64] Convert vector add(ext, ext) into ext(add(ext, ext))

Given a vector add or sub from extends that needs more that one 'step'
(i.e i8 to i32 or i16 to i64), we can transform the sequence to
sext(add(ext, ext)), to allow the add(ext, ext) to become a single uaddl
and a larger extend, producing less instructions in total.
https://alive2.llvm.org/ce/z/S2T4k-

Differential Revision: https://reviews.llvm.org/D128426
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/insert-extend.ll
llvm/test/CodeGen/AArch64/neon-extadd.ll
llvm/test/CodeGen/AArch64/reduce-shuffle.ll