[all-commits] [llvm/llvm-project] 0c032f: [RISCV] Use SHL_ADD in remaining strength reduce c...

Philip Reames via All-commits all-commits at lists.llvm.org
Tue Apr 23 12:41:17 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0c032fd5425d853dfc577e607b9c179d811cec19
      https://github.com/llvm/llvm-project/commit/0c032fd5425d853dfc577e607b9c179d811cec19
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
    M llvm/test/CodeGen/RISCV/rv64-legal-i32/xaluo.ll
    M llvm/test/CodeGen/RISCV/xaluo.ll

  Log Message:
  -----------
  [RISCV] Use SHL_ADD in remaining strength reduce cases for MUL (#89789)

The interesting bit is the zext folding. This is the first case where we
end up with a profitable fold of shNadd (zext x), y to shNadd.uw x, y.
See zext_mul68 from rv64zba.ll.

The test differences are cases where we can legally fold (only because
there's no one use check). These are not profitable or harmful, but we
can't a oneuse check without breaking the zext_mul68 case.

Note that XTHeadBa doesn't appear to have the equivalent patterns so
this only shows up in Zba.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list