[llvm] [llvm][RISCV] Handle atomic and volatile in ZilsdOptimizer (PR #169169)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 22 09:56:16 PST 2025


topperc wrote:

> > It's not legal to change the size of an atomic/volatile operation. I think I need to leave the SelectionDAG handling for them.
> 
> Do you mean it's not gonna compile if we have `i64 load volatile` but not `zilsd` on rv32?

I think an i64 atomic load will be converted to a libcall before SelectionDAG. volatile is weirder. Without Zilsd, i64 gets split because we have no other choice. With Zilsd we should either always split to match the non-Zilsd behavior if someone depends on that. Or we have to always used Zilsd ld/sd. If we sometimes use Zilsd and sometimes not, then users won't know what they can rely on.

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


More information about the llvm-commits mailing list