[PATCH] D108939: [RISCVISelLowering] avoid emitting libcalls to __mulodi4() and __multi3()

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 30 13:07:14 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/mul.ll:1463
+; RV32I-NEXT:    mv a3, s2
+; RV32I-NEXT:    call __muldi3 at plt
+; RV32I-NEXT:    add a3, a0, s0
----------------
jrtc27 wrote:
> nickdesaulniers wrote:
> > hmm...probably want to avoid `MUL_I64`, too?
> For the case you care about (RV32IM below) it is, and if you were to add MUL_I64 then it would just emit a libcall to __mulsi3, and I don't think you want to be inlining soft multiplication for every width of multiplication. That would make embedded people targeting small code size extremely unhappy.
I think this is ok https://godbolt.org/z/s185EsdGa


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108939



More information about the llvm-commits mailing list