[PATCH] D111484: [RISCV] Optimize immediate materialisation with SH*ADD

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 11 21:17:08 PDT 2021


benshi001 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp:208
+      if (TmpSeq.size() < Res.size())
+        Res = TmpSeq;
+    }
----------------
I use `Res = TmpSeq` instead of `return TmpSeq`, since there could be other optimization with Zbs, and I would like to do further contrast to select the best instruction sequence.


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

https://reviews.llvm.org/D111484



More information about the llvm-commits mailing list