[all-commits] [llvm/llvm-project] 0381e0: Recommit "[RISCV] Add isel optimization for (and (...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Aug 23 09:38:14 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0381e01424692a746b941e470c4cc44f6f0bf258
      https://github.com/llvm/llvm-project/commit/0381e01424692a746b941e470c4cc44f6f0bf258
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-08-23 (Fri, 23 Aug 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
    M llvm/test/CodeGen/RISCV/rv64zba.ll

  Log Message:
  -----------
  Recommit "[RISCV] Add isel optimization for (and (sra y, c2), c1) to recover regression from #101751. (#104114)"

Fixed an incorrect cast.

Original message:

If c1 is a shifted mask with c3 leading zeros and c4 trailing zeros. If
c2 is greater than c3, we can use (srli (srai y, c2 - c3), c3 + c4)
followed by a SHXADD with c4 as the X amount.

Without Zba we can use (slli (srli (srai y, c2 - c3), c3 + c4), c4).
Alive2: https://alive2.llvm.org/ce/z/AwhheR



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