[all-commits] [llvm/llvm-project] 7dbf2e: Teach PeepholeOpt to eliminate redundant copy from...

Philip Reames via All-commits all-commits at lists.llvm.org
Mon May 16 16:39:28 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7dbf2e7b576f52f1c459665fe524d7521d560dae
      https://github.com/llvm/llvm-project/commit/7dbf2e7b576f52f1c459665fe524d7521d560dae
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-05-16 (Mon, 16 May 2022)

  Changed paths:
    M llvm/lib/CodeGen/PeepholeOptimizer.cpp
    M llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
    M llvm/test/CodeGen/RISCV/vlenb.ll

  Log Message:
  -----------
  Teach PeepholeOpt to eliminate redundant copy from constant physreg (e.g VLENB on RISCV)

The existing redundant copy elimination required a virtual register source, but the same logic works for any physreg where we don't have to worry about clobbers.  On RISCV, this helps eliminate redundant CSR reads from VLENB.

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




More information about the All-commits mailing list