[RISCV] Disable (mul (and X, 0xffffffff), (and Y, 0xffffffff)) optimization when...
authorCraig Topper <craig.topper@sifive.com>
Sat, 20 Mar 2021 22:14:46 +0000 (15:14 -0700)
committerCraig Topper <craig.topper@sifive.com>
Sat, 20 Mar 2021 22:31:45 +0000 (15:31 -0700)
commit07ed62b7d5514937a50b4af4feaa1969911d142e
tree03b4f2b7e90d70974ac1559c14224d905ded298b
parent0874281d6054d8f5645bb066271b6f73acde7e80
[RISCV] Disable (mul (and X, 0xffffffff), (and Y, 0xffffffff)) optimization when Zba is enabled.

This optimization is trying to save SRLI instructions needed to
implement the ANDs. If we have zext.w we won't save anything.
Because we don't check that the multiply is the only user of the
AND we might even increase instruction count.
llvm/lib/Target/RISCV/RISCVInstrInfoM.td
llvm/test/CodeGen/RISCV/xaluo.ll