[all-commits] [llvm/llvm-project] cb82de: [RISCV] Optimize multiplication by constant

Ben Shi via All-commits all-commits at lists.llvm.org
Tue Jul 7 18:50:48 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cb82de29601745d6c4beaf51ee1dbd1bf7acc186
      https://github.com/llvm/llvm-project/commit/cb82de29601745d6c4beaf51ee1dbd1bf7acc186
  Author: Ben Shi <powerman1st at 163.com>
  Date:   2020-07-07 (Tue, 07 Jul 2020)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.h
    M llvm/test/CodeGen/RISCV/mul.ll

  Log Message:
  -----------
  [RISCV] Optimize multiplication by constant

... to shift/add or shift/sub.

Do not enable it on riscv32 with the M extension where decomposeMulByConstant
may not be an optimization.

Reviewed By: luismarques, MaskRay

Differential Revision: https://reviews.llvm.org/D82660




More information about the All-commits mailing list