[RISCV] Optimize multiplication with immediates
The optimization of (mul x, c) to (ADD (SLLI x, i0), (SLLI x, i1)) is only enabled for i32 multiplication on rv64, because of the regression in i64 multiplication on rv32. However we can change the condition to that the immediate 'c' should only be used once, then the above regression can also be avoided, and ohter chances of optimization can be enabled. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147410
Loading
Please sign in to comment