On 2020-08-25 6:18 a.m., Alex Coplan wrote:
The motivation here is to be able to remove several redundant patterns
in the AArch64 backend. See the previous thread [1] for context.

Testing:
  * Bootstrapped and regtested on aarch64-none-linux-gnu,
    x86_64-pc-linux-gnu.
  * New unit test which checks that we're using the shift pattern (rather
    than the problematic mult pattern) on AArch64.

OK for master?
Yes. Thank you for working on this issue and the patch.
Thanks,
Alex

[0] : https://gcc.gnu.org/onlinedocs/gccint/Insn-Canonicalizations.html
[1] : https://gcc.gnu.org/pipermail/gcc-patches/2020-August/552066.html

---

gcc/ChangeLog:

        * lra-constraints.c (canonicalize_reload_addr): New.
        (curr_insn_transform): Use canonicalize_reload_addr to ensure we
        generate canonical RTL for an address reload.

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/mem-shift-canonical.c: New test.


Reply via email to