[llvm] [RISCV] Guard the alternative static chain register use on RV32E (PR #142715)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 22:01:42 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()))
----------------
topperc wrote:

It's just as broken for RV64E too right?

https://github.com/llvm/llvm-project/pull/142715


More information about the llvm-commits mailing list