[AArch64][DAGCombiner]: combine <2xi64> add/sub.
authorHassnaa Hamdi <hassnaa.hamdi@arm.com>
Thu, 30 Mar 2023 14:41:58 +0000 (14:41 +0000)
committerHassnaa Hamdi <hassnaa.hamdi@arm.com>
Wed, 5 Apr 2023 09:18:09 +0000 (09:18 +0000)
commit6a8d8f3e28aed1b77356be74ee5109d7bdd37dd1
tree422d983831fabad798bb9307b2899cf8006ee332
parent0e37487df8e030b9e468166fa3d088678bf7d0a1
[AArch64][DAGCombiner]: combine <2xi64> add/sub.

64-bit vector mul is not supported in NEON,
so we use the SVE's mul.
To improve the performance, we can go one step further,
and use SVE's add/sub, so that we can use SVE's mla/mls.
That works on these patterns:
// This works on the patterns of:
//   add v1, (mul v2, v3)
//   sub v1, (mul v2, v3)

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D147236
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/aarch64-combine-add-sub-mul.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/sve-fixed-length-int-rem.ll