[all-commits] [llvm/llvm-project] d5072b: [RISCV] Select (and (shl X, 8), 0xff00) -> (packh ...

Piotr Fusik via All-commits all-commits at lists.llvm.org
Thu Dec 4 11:25:37 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d5072b94ddc0e9311b67fe4742857c7d2f306e9a
      https://github.com/llvm/llvm-project/commit/d5072b94ddc0e9311b67fe4742857c7d2f306e9a
  Author: Piotr Fusik <p.fusik at samsung.com>
  Date:   2025-12-04 (Thu, 04 Dec 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
    M llvm/test/CodeGen/RISCV/rv32zbkb.ll
    M llvm/test/CodeGen/RISCV/rv64zbkb.ll

  Log Message:
  -----------
  [RISCV] Select (and (shl X, 8), 0xff00) -> (packh zero, X) (#170654)

Similar transforms with "pack" and "packw" are not useful:
(pack  zero, X) == (slli  X, XLEN/2)
(packw zero, X) == (slliw X, 16)



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