[all-commits] [llvm/llvm-project] 7dfbf0: [RISCV] Fold (and (not (srl X, C)), 1) to (xor (be...

Jianjian Guan via All-commits all-commits at lists.llvm.org
Wed Dec 15 23:15:20 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7dfbf0b60f03f1708d998119aed55320ff206cbd
      https://github.com/llvm/llvm-project/commit/7dfbf0b60f03f1708d998119aed55320ff206cbd
  Author: jacquesguan <jacquesguan at me.com>
  Date:   2021-12-16 (Thu, 16 Dec 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
    M llvm/test/CodeGen/RISCV/rv32zbs.ll
    M llvm/test/CodeGen/RISCV/rv64zbs.ll

  Log Message:
  -----------
  [RISCV] Fold (and (not (srl X, C)), 1) to (xor (bexti X, C), 1) when have Zbs extension.

When have Zbs extension, we could use bexti to fold (and (not (srl X, C)), 1) to (xor (bexti X, C), 1).

Differential Revision: https://reviews.llvm.org/D115629




More information about the All-commits mailing list