[all-commits] [llvm/llvm-project] 255162: [RISC-V] Do not emit cm.popret[z] with zicfiss (#1...

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Tue Jul 28 12:59:41 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 255162ae0ebe805df151c5c4b48e1a47a5dd74f0
      https://github.com/llvm/llvm-project/commit/255162ae0ebe805df151c5c4b48e1a47a5dd74f0
  Author: Nemanja Ivanovic <nemanja.i.llvm at gmail.com>
  Date:   2026-07-28 (Tue, 28 Jul 2026)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
    M llvm/lib/Target/RISCV/RISCVPushPopOptimizer.cpp
    A llvm/test/CodeGen/RISCV/shadow-stack-zcmp.ll
    M llvm/test/CodeGen/RISCV/shadowcallstack.ll

  Log Message:
  -----------
  [RISC-V] Do not emit cm.popret[z] with zicfiss (#196267)

When emitting shadow call stack protection instructions, the push/pop
optimization needs to be turned off because an sspopchk before a
cm.popret[z] is guaranteed to fail in a non-leaf function. In addition,
the sspopchk must be emitted after a cm.pop so that the ra has the
correct value when the check is performed.

Fixes: https://github.com/llvm/llvm-project/issues/196261

Co-authored-by: Nemanja Ivanovic <nemanja at synopsys.com>



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