[Bug target/99988] aarch64: GCC generates excessive consecutive bti j instructions
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 12 09:58:15 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99988
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Alex Coplan
<acoplan@gcc.gnu.org>:
https://gcc.gnu.org/g:419c243dfb9aba51aceb1370a241db082847eeb5
commit r10-9818-g419c243dfb9aba51aceb1370a241db082847eeb5
Author: Alex Coplan <alex.coplan@arm.com>
Date: Wed Apr 21 14:42:04 2021 +0100
aarch64: Avoid duplicating bti j insns for jump tables [PR99988]
This patch fixes PR99988 which shows us generating large (> 250)
sequences of back-to-back bti j instructions.
The fix is simply to avoid inserting bti j instructions at the target of
a jump table if we've already inserted one for a given label.
Co-Authored-By: Christophe Lyon <clyon@gcc.gnu.org>
gcc/ChangeLog:
PR target/99988
* config/aarch64/aarch64-bti-insert.c (aarch64_bti_j_insn_p): New.
(rest_of_insert_bti): Avoid inserting duplicate bti j insns for
jump table targets.
gcc/testsuite/ChangeLog:
PR target/99988
* gcc.target/aarch64/pr99988.c: New test.
(cherry picked from commit 1011bb8bc67cf34c45a9237d72a801a14ad9ef0f)
More information about the Gcc-bugs
mailing list