[RISCV] Optimize mul in the zba extension with SH*ADD
This patch makes the following optimization, if the immediate multiplier is not a simm12. (mul x, (power_of_2 + 2)) => (SH1ADD x, (SLLI x, bits)) (mul x, (power_of_2 + 4)) => (SH2ADD x, (SLLI x, bits)) (mul x, (power_of_2 + 8)) => (SH3ADD x, (SLLI x, bits)) Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D106648
Loading
Please sign in to comment