[all-commits] [llvm/llvm-project] 087428: [RISCV] Add Zba command lines to xaluo.ll. NFC

Craig Topper via All-commits all-commits at lists.llvm.org
Sat Mar 20 15:33:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0874281d6054d8f5645bb066271b6f73acde7e80
      https://github.com/llvm/llvm-project/commit/0874281d6054d8f5645bb066271b6f73acde7e80
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-03-20 (Sat, 20 Mar 2021)

  Changed paths:
    M llvm/test/CodeGen/RISCV/xaluo.ll

  Log Message:
  -----------
  [RISCV] Add Zba command lines to xaluo.ll. NFC

Some of the patterns end up with 32 to 64 bit zero extends on RV64
which can be handled by zext.w.


  Commit: 07ed62b7d5514937a50b4af4feaa1969911d142e
      https://github.com/llvm/llvm-project/commit/07ed62b7d5514937a50b4af4feaa1969911d142e
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-03-20 (Sat, 20 Mar 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfoM.td
    M llvm/test/CodeGen/RISCV/xaluo.ll

  Log Message:
  -----------
  [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.


Compare: https://github.com/llvm/llvm-project/compare/1fe1e996e987...07ed62b7d551


More information about the All-commits mailing list