[all-commits] [llvm/llvm-project] 21ef17: [LoongArch] Avoid indirect branch jumps using the ...

wanglei via All-commits all-commits at lists.llvm.org
Sun Nov 10 22:15:43 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 21ef17c626456496a18e2a078a11d8eccf26ee31
      https://github.com/llvm/llvm-project/commit/21ef17c626456496a18e2a078a11d8eccf26ee31
  Author: wanglei <wanglei at loongson.cn>
  Date:   2024-11-11 (Mon, 11 Nov 2024)

  Changed paths:
    M llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
    M llvm/lib/Target/LoongArch/LoongArchRegisterInfo.td
    M llvm/test/CodeGen/LoongArch/jr-without-ra.ll

  Log Message:
  -----------
  [LoongArch] Avoid indirect branch jumps using the ra register

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.

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

Reviewed By: SixWeining

Pull Request: https://github.com/llvm/llvm-project/pull/115424



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list