[PATCH] D147410: [RISCV] Optimize multiplication with immediates

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 21:51:34 PDT 2023


benshi001 added a comment.

ping ...

The optimization of `(mul x, c)` to `(ADD (SLLI x, i0), (SLLI x, i1))` is only enabled for i32 multiplication on rv64, is due to the regression of i64 multiplication on rv32.

we can change the condition to that `c` should only be used once, then the above regression can also be avoided, and ohter chances of optimization can be enabled.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147410



More information about the llvm-commits mailing list