[llvm] [RISCV] Guard the alternative static chain register use on RV32E (PR #142715)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 3 22:53:08 PDT 2025
================
@@ -338,6 +338,10 @@ bool llvm::CC_RISCV(unsigned ValNo, MVT ValVT, MVT LocVT,
bool HasCFBranch =
Subtarget.hasStdExtZicfilp() &&
MF.getFunction().getParent()->getModuleFlag("cf-protection-branch");
+ if (HasCFBranch && (Subtarget.isRV32() && Subtarget.hasStdExtE()))
----------------
lenary wrote:
Yes, and this should be checking for the E ABIs, not the E Architectures.
https://github.com/llvm/llvm-project/pull/142715
More information about the llvm-commits
mailing list