https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112987
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Szabolcs Nagy <n...@gcc.gnu.org>: https://gcc.gnu.org/g:305fe4f136a3a3a78377a48c55d546000a3ba529 commit r14-8432-g305fe4f136a3a3a78377a48c55d546000a3ba529 Author: Szabolcs Nagy <szabolcs.n...@arm.com> Date: Wed Jan 24 18:50:19 2024 +0000 aarch64: Fix eh_return for -mtrack-speculation [PR112987] Recent commit introduced a conditional branch in eh_return epilogues that is not compatible with speculation tracking: commit 426fddcbdad6746fe70e031f707fb07f55dfb405 Author: Szabolcs Nagy <szabolcs.n...@arm.com> CommitDate: 2023-11-27 15:52:48 +0000 aarch64: Use br instead of ret for eh_return Refactor the compare zero and jump pattern and use it to fix the issue. gcc/ChangeLog: PR target/112987 * config/aarch64/aarch64.cc (aarch64_gen_compare_zero_and_branch): New. (aarch64_expand_epilogue): Use the new function. (aarch64_split_compare_and_swap): Likewise. (aarch64_split_atomic_op): Likewise.