craig.topper added a comment. I think we failed to consider the offset in the store itself in RISCVRegisterInfo::isFrameOffsetLegal Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98101/new/ https://reviews.llvm.org/D98101