[PATCH] D93619: [RISCV] Optimize multiplication with constant

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 6 22:00:40 PST 2021


jrtc27 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:3907
     if (auto *ConstNode = dyn_cast<ConstantSDNode>(C.getNode())) {
-      if (ConstNode->getAPIntValue().getBitWidth() > 8 * sizeof(int64_t))
+      // Optimize to '±(1<<m)±1' if applicable.
+      const APInt &Imm = ConstNode->getAPIntValue();
----------------
Please refrain from using unicode


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

https://reviews.llvm.org/D93619



More information about the llvm-commits mailing list