[PATCH] D111034: [AArch64] Optimize add/sub with immediate

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 12 08:10:13 PDT 2021


benshi001 added a comment.

In D111034#3058375 <https://reviews.llvm.org/D111034#3058375>, @dmgreen wrote:

> Thanks. Code looks good to me.
>
> Are there test cases anywhere for having these adds in a loop? And for negative tests where we are out of range for the transform?

We do not have such tests, I will add three more tests,

1. add/sub 0x1ffffff, which exceeds 0xffffff;
2. add/sub 0xaaaa, which does not exceed 0xffffff, but can be composed to (add x, (mov y, 0xaaaa));
3. add/sub 0xaaaaaa inside a loop and this split optimization is blocked.

Do you think enough ?

Thank you.


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

https://reviews.llvm.org/D111034



More information about the llvm-commits mailing list