https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110136
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by LuluCheng <chengl...@gcc.gnu.org>: https://gcc.gnu.org/g:5430c86e71927492399129f3df80824c6c334ddf commit r14-1866-g5430c86e71927492399129f3df80824c6c334ddf 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>