]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Prevent moving throwing accesses in ldp/stp pass [PR113093]
authorAlex Coplan <alex.coplan@arm.com>
Thu, 21 Dec 2023 10:52:44 +0000 (10:52 +0000)
committerAlex Coplan <alex.coplan@arm.com>
Thu, 21 Dec 2023 10:52:44 +0000 (10:52 +0000)
commitaca1f9d7cab3dc1a374a7dc0ec6f7a8d02d2869a
tree2468c7ac077d6434a8ab716d93b2d822e4e4ad43
parent41a5f67db3cd625d2f3cfba6a87d3530a3291f33
aarch64: Prevent moving throwing accesses in ldp/stp pass [PR113093]

As the PR shows, there was nothing to prevent the ldp/stp pass from
trying to move throwing insns, which lead to an RTL verification
failure.

This patch fixes that.

gcc/ChangeLog:

PR target/113093
* config/aarch64/aarch64-ldp-fusion.cc (latest_hazard_before):
If the insn is throwing, record the previous insn as a hazard to
prevent moving it from the end of the BB.

gcc/testsuite/ChangeLog:

PR target/113093
* gcc.dg/pr113093.c: New test.
gcc/config/aarch64/aarch64-ldp-fusion.cc
gcc/testsuite/gcc.dg/pr113093.c [new file with mode: 0644]