HomePhabricator

[RISCV] Optimize multiplication with constant

Authored by benshi001 on Jan 8 2021, 6:37 PM.

Description

[RISCV] Optimize multiplication with constant

  1. Break MUL with specific constant to a SLLI and an ADD/SUB on riscv32 with the M extension.
  2. Break MUL with specific constant to two SLLI and an ADD/SUB, if the constant needs a pair of LUI/ADDI to construct.

Reviewed by: craig.topper

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

Details

Committed
benshi001Jan 8 2021, 6:37 PM
Reviewer
craig.topper
Differential Revision
D93619: [RISCV] Optimize multiplication with constant
Parents
rG467cbd298184: [clangd][NFC] Remove unnecessary copy in CodeComplete
Branches
Unknown
Tags
Unknown