[all-commits] [llvm/llvm-project] 264018: [RISCV] Mark vsadd(u)_vl as commutable

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Jul 8 10:18:50 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 264018d764e6b23690df900680b83df93951beb3
      https://github.com/llvm/llvm-project/commit/264018d764e6b23690df900680b83df93951beb3
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-07-08 (Fri, 08 Jul 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
    M llvm/test/CodeGen/RISCV/rvv/active_lane_mask.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vsadd.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vsaddu.ll

  Log Message:
  -----------
  [RISCV] Mark vsadd(u)_vl as commutable

This allows fixed length vectors involving splats on the LHS to commute into the _vx form of the instruction. Oddly, the generic canonicalization rules appear to catch the scalable vector cases. I haven't fully dug in to understand why, but I suspect it's because of a difference in how we represent splats (splat_vector vs build_vector).

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




More information about the All-commits mailing list