[all-commits] [llvm/llvm-project] 1b736b: [RISCV] Enable CGP to sink splat operands of Add/S...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Sep 10 09:13:55 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1b736bda3bb5acd2874e862d9fd0cec335dd899b
      https://github.com/llvm/llvm-project/commit/1b736bda3bb5acd2874e862d9fd0cec335dd899b
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-09-10 (Fri, 10 Sep 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.h
    M llvm/test/CodeGen/RISCV/rvv/sink-splat-operands.ll

  Log Message:
  -----------
  [RISCV] Enable CGP to sink splat operands of Add/Sub/Mul/Shl/LShr/AShr

LICM may have pulled out a splat, but with .vx instructions we
can fold it into an operation.

This patch enables CGP to reverse the LICM transform and move the
splat back into the loop.

I've started with the commutable integer operations and shifts, but we can
extend this with more operations in future patches.

Reviewed By: frasercrmck

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




More information about the All-commits mailing list