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.
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.