]> gcc.gnu.org Git - gcc.git/commit
[AArch64] Fix shrinkwrapping interactions with atomics (PR92692)
authorWilco Dijkstra <wdijkstr@arm.com>
Fri, 17 Jan 2020 13:17:21 +0000 (13:17 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 17 Sep 2020 15:14:52 +0000 (17:14 +0200)
commitace877912bd2231a6c5ad91ef2565e1788128f2d
tree775cc3d5d30728e01da0046be170c85251c6dc3b
parentde6ec19aa33ff307ccc707798d545f4a98f6a438
[AArch64] Fix shrinkwrapping interactions with atomics (PR92692)

The separate shrinkwrapping pass may insert stores in the middle
of atomics loops which can cause issues on some implementations.
Avoid this by delaying splitting atomics patterns until after
prolog/epilog generation.

gcc/
PR target/92692
* config/aarch64/aarch64.c (aarch64_split_compare_and_swap)
Add assert to ensure prolog has been emitted.
(aarch64_split_atomic_op): Likewise.
* config/aarch64/atomics.md (aarch64_compare_and_swap<mode>)
Use epilogue_completed rather than reload_completed.
(aarch64_atomic_exchange<mode>): Likewise.
(aarch64_atomic_<atomic_optab><mode>): Likewise.
(atomic_nand<mode>): Likewise.
(aarch64_atomic_fetch_<atomic_optab><mode>): Likewise.
(atomic_fetch_nand<mode>): Likewise.
(aarch64_atomic_<atomic_optab>_fetch<mode>): Likewise.
(atomic_nand_fetch<mode>): Likewise.

(cherry picked from commit a708cb25d9284e9234b6457f8260bfc79f09043e)
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/atomics.md
This page took 0.060184 seconds and 6 git commands to generate.