[all-commits] [llvm/llvm-project] 26b832: [RISCV] Add DAG combine to turn (sub (shl X, 8-Y), ...

Daniel Mokeev via All-commits all-commits at lists.llvm.org
Fri Oct 11 05:42:09 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 26b832a9ec03d0a35baaf00d81f607004fe2a8cf
      https://github.com/llvm/llvm-project/commit/26b832a9ec03d0a35baaf00d81f607004fe2a8cf
  Author: Daniel Mokeev <mokeev.gh at gmail.com>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    A llvm/test/CodeGen/RISCV/orc-b-patterns.ll

  Log Message:
  -----------
  [RISCV] Add DAG combine to turn (sub (shl X, 8-Y), (shr X, Y)) into orc.b (#111828)

This patch generalizes the DAG combine for `(sub (shl X, 8), X) =>
(orc.b X)`
into the more general form of `(sub (shl X, 8 - Y), (srl X, Y)) =>
(orc.b X)`.

Alive2 generalized proof: https://alive2.llvm.org/ce/z/dFcf_n
Related issue: https://github.com/llvm/llvm-project/issues/96595
Related PR: https://github.com/llvm/llvm-project/pull/96680



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