[PATCH] D118667: [RISCV] Fix a vsetvli insertion bug involving loads/stores.

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 1 01:53:07 PST 2022


frasercrmck accepted this revision.
frasercrmck added a comment.
This revision is now accepted and ready to land.

LGTM, thank you! Certainly saved me some time today.

I do think that the cracks are showing in this pass, though. I think spending time making it more robust would benefit us in the long term. If we could get the optimization parts of the pass working as actual optimizations on top of a valid MIR program (rather than as speculative changes on data structures over invalid MIR), that'd be a good thing. Might help make it more maintainable too.



================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:1002
   VSETVLIInfo CurInfo;
+  // BBLocalInfo tracks the VL/VTYPE state way BBInfo.Change was calculated in
+  // computeIncomingVLVTYPE. We need this to apply canSkipVSETVLIForLoadStore
----------------
Missing a word here, perhaps?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118667



More information about the llvm-commits mailing list