[llvm] [RISCV] Use addi rather than addiw for immediates materialised by lui+addi(w) pairs when possible (PR #141663)

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Wed May 28 04:29:09 PDT 2025


asb wrote:

> I think something like this should work.

Not sure if it makes sense to break out to a separate PR, but I've added this tentatively to this PR so at least we're all looking at the same thing. I can no longer see any cases of sext.w being introduced looking at the llvm-test-suite diff. I do see one or two odd cases where we end up with `lwu` but didn't before which I need to look into.

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


More information about the llvm-commits mailing list