[all-commits] [llvm/llvm-project] 336b29: [RISCV] Use a DAG combine to prune pointless vrgat...

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Apr 11 20:03:14 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 336b290923151d02fd6b3050ccbaf74f0aa08339
      https://github.com/llvm/llvm-project/commit/336b290923151d02fd6b3050ccbaf74f0aa08339
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2025-04-11 (Fri, 11 Apr 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.h
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-int.ll

  Log Message:
  -----------
  [RISCV] Use a DAG combine to prune pointless vrgather.vi (#135392)

If the vrgather.vi is preceeded by a vmv.v.x which writes a superset of
the lanes writen by the vrgather, and the vrgather has no passthru, then
the vrgather has no semantic effect.

This is the start of a mini-series of patches around rewriting
vrgather.vi/vx preceeded by vmv.v.x, vfmf.v.f, vmv.s.x, etc... Starting
with the simplest, but also lowest impact.

One point I'd like a second oppinion on is the out of bounds semenatic
change. As far as I can tell, all the indices are in bounds by
construction. The doc change is as much as I couldn't figure out how to
test the alternative as anything else.



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