[AArch64] Reassociate sub(x, add(m1, m2)) to sub(sub(x, m1), m2)
authorDavid Green <david.green@arm.com>
Mon, 13 Feb 2023 14:35:10 +0000 (14:35 +0000)
committerDavid Green <david.green@arm.com>
Mon, 13 Feb 2023 14:35:10 +0000 (14:35 +0000)
commite9eaee9da196265d20dbeaf7920c24ccb33e2d04
tree45115e3a5a74083a1f076dff8bcabb52d453fe0a
parentaf3c25dc3d871a7665610a819426c31d5eb17a03
[AArch64] Reassociate sub(x, add(m1, m2)) to sub(sub(x, m1), m2)

The mid end will reassociate sub(sub(x, m1), m2) to sub(x, add(m1, m2)). This
reassociates it back to allow the creation of more mls instructions.

Differential Revision: https://reviews.llvm.org/D143143
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/arm64-vmul.ll
llvm/test/CodeGen/AArch64/reassocmls.ll