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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 20:32:48 PST 2020


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:3831
+      APInt High(VT.getSizeInBits(), 2047, true);
+      if ((Imm.slt(Low) || Imm.sgt(High)) && 0 != (Imm & High)) {
+        APInt ImmS = Imm.ashr(Imm.countTrailingZeros());
----------------
Is the first part of this just !Imm.isSignedIntN(12)? And 0 != (Imm & High) is !Imm.isIntN(11)?


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

https://reviews.llvm.org/D93619



More information about the llvm-commits mailing list