[PATCH] D157373: [RISCV] add a compress optimization for stack inst.

lcvon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 06:30:30 PDT 2023


lcvon007 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:1322
+      //          c.fsdsp rs2, offset[8:3] => 2^(6 + 3)
+      const uint64_t RVCompressLen = STI.getXLen() << 3;
+      // Avoid increasing extra instructions when ld/st can be compressed.
----------------
craig.topper wrote:
> Use `* 8`. Let the compiler convert it to a shift.
done


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157373



More information about the llvm-commits mailing list