https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113217

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alex Coplan <acop...@gcc.gnu.org>:

https://gcc.gnu.org/g:4b67ec7ff5b1aa9b3b70e9b58afc594b890abeb0

commit r14-6947-g4b67ec7ff5b1aa9b3b70e9b58afc594b890abeb0
Author: Alex Coplan <alex.cop...@arm.com>
Date:   Fri Jan 5 12:25:00 2024 +0000

    aarch64: Further fix for throwing insns in ldp/stp pass [PR113217]

    As the PR shows, the fix in
    r14-6916-g057dc349021660c40699fb5c98fd9cac8e168653 was not complete.
    That fix was enough to stop us trying to move throwing accesses above
    nondebug insns, but due to this code in try_fuse_pair:

      // Placement strategy: push loads down and pull stores up, this should
      // help register pressure by reducing live ranges.
      if (load_p)
        range.first = range.last;
      else
        range.last = range.first;

    we would still try to move stores up above any debug insns that occurred
    immediately after the previous nondebug insn.  This patch fixes that by
    narrowing the move range in the case that the second access is throwing
    to exactly the range of that insn.

    Note that we still need the fix to latest_hazard_before mentioned above
    so as to ensure we select a suitable base and reject pairs if it isn't
    viable to form the pair at the end of the BB.

    gcc/ChangeLog:

            PR target/113217
            * config/aarch64/aarch64-ldp-fusion.cc
            (ldp_bb_info::try_fuse_pair): If the second access can throw,
            narrow the move range to exactly that insn.

    gcc/testsuite/ChangeLog:

            PR target/113217
            * g++.dg/pr113217.C: New test.

Reply via email to