[PATCH] D129948: [RISCV] Fold stack reload into sext.w by using lw instead of ld.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 09:13:11 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp:652
+
+  // Fold sext.w+load from stack to lw.
+  // TODO: Fold with sext.b, sext.h, zext.b, zext.h, zext.w?
----------------
asb wrote:
> frasercrmck wrote:
> > Maybe it's just me but I read "sext.w+load" the other way round than it's intended here. Maybe I'm interpreting "+" as "followed-by"?
> You're right, load+sext.w would seem clearer. Or maybe just use S-expressions to remove any ambiguity.
I think i wrong it that way because of "load from stack". I  rewrote to "load from stack followed by sext.w" and remove the `+`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129948/new/

https://reviews.llvm.org/D129948



More information about the llvm-commits mailing list