[PATCH] D130543: [RISCV]Enable isIntDivCheap when attribute is minsize

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 23:13:26 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:12531
+  // TODO: Add vector division?
+  bool OptSize = Attr.hasFnAttr(Attribute::MinSize);
+  return OptSize && !VT.isVector();
----------------
barannikov88 wrote:
> There is `MF->getFunction().hasOptSize()` which also checks for `Attribute::OptimizeForSize`.
> Just a suggestion.
Every other target that does this only does it for MinSize. Are you suggesting we do this for -Os as well?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130543



More information about the llvm-commits mailing list