https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110136

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by LuluCheng
<chengl...@gcc.gnu.org>:

https://gcc.gnu.org/g:f829733b5c92877247727347246d9f927372f0c1

commit r13-7448-gf829733b5c92877247727347246d9f927372f0c1
Author: Lulu Cheng <chengl...@loongson.cn>
Date:   Wed Jun 7 10:21:58 2023 +0800

    LoongArch: Avoid non-returning indirect jumps through $ra [PR110136]

    Micro-architecture unconditionally treats a "jr $ra" as "return from
subroutine",
    hence doing "jr $ra" would interfere with both subroutine return prediction
and
    the more general indirect branch prediction.

    Therefore, a problem like PR110136 can cause a significant increase in
branch error
    prediction rate and affect performance. The same problem exists with
"indirect_jump".

    gcc/ChangeLog:

            PR target/110136
            * config/loongarch/loongarch.md: Modify the register constraints
for template
            "jumptable" and "indirect_jump" from "r" to "e".

    Co-authored-by: Andrew Pinski <apin...@marvell.com>

    (cherry picked from commit 5430c86e71927492399129f3df80824c6c334ddf)

Reply via email to