[all-commits] [llvm/llvm-project] 89f119: [RISCV] Update matchSplatAsGather to use the index...

Mikhail R. Gadelha via All-commits all-commits at lists.llvm.org
Tue Jan 21 12:52:17 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89f119cbdae0beb606229ca422cdd9e1400d0746
      https://github.com/llvm/llvm-project/commit/89f119cbdae0beb606229ca422cdd9e1400d0746
  Author: Mikhail R. Gadelha <mikhail at igalia.com>
  Date:   2025-01-21 (Tue, 21 Jan 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/intrinsic-vector-match.ll
    M llvm/test/CodeGen/RISCV/rvv/splat-vectors.ll

  Log Message:
  -----------
  [RISCV] Update matchSplatAsGather to use the index of extract_elt if in-bounds (#118873)

This is a follow-up to #117878 and allows the usage of vrgather if the index
we are accessing in VT is constant and within bounds.

This patch replaces the previous behavior of bailing out if the length of the
search vector is greater than the vector of elements we are searching for.
Since matchSplatAsGather works on EXTRACT_VECTOR_ELT, and we know the index
from which the element is extracted, we only need to check if we are doing an
insert from a larger vector into a smaller one, in which we do an extract
instead.

Co-authored-by: Luke Lau luke_lau at icloud.com
Co-authored-by: Philip Reames preames at rivosinc.com



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