[PATCH] D143143: [AArch64] Reassociate sub(x, add(m1, m2)) to sub(sub(x, m1), m2)

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 02:41:47 PST 2023


dmgreen added a comment.

In D143143#4114749 <https://reviews.llvm.org/D143143#4114749>, @SjoerdMeijer wrote:

> The patch looks good to me, but I was just wondering if another approach would be to just match the `sub(x, add(m1, m2)).` pattern as mls, or is this easier/better?

Thats for taking a look. That might be an option, but it would need to match `sub(x, add(mul(a,b), mul(c,d)))` to two `msub(msub(x, a, b), c, d)` for all the different types of mls. I think it is probably simpler to go the un-reassociate route.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143143/new/

https://reviews.llvm.org/D143143



More information about the llvm-commits mailing list