[all-commits] [llvm/llvm-project] 6238b8: [LegalizeTypes] Factor in vscale_range when wideni...

Luke Lau via All-commits all-commits at lists.llvm.org
Mon Aug 14 01:58:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6238b8ea6399e485a197b5962c033974ed8fca37
      https://github.com/llvm/llvm-project/commit/6238b8ea6399e485a197b5962c033974ed8fca37
  Author: Luke Lau <luke at igalia.com>
  Date:   2023-08-14 (Mon, 14 Aug 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
    M llvm/test/CodeGen/RISCV/rvv/insert-subvector.ll

  Log Message:
  -----------
  [LegalizeTypes] Factor in vscale_range when widening insert_subvector

Currently when widening operands for insert_subvector nodes, we check
first that the indices are valid by seeing if the subvector is
statically known to be smaller than or equal to the in-place vector.

However if we're inserting a fixed subvector into a scalable vector we rely on
the minimum vector length of the latter. This patch extends the widening logic
to also take into account the minimum vscale from the vscale_range attribute,
so we can handle more scenarios where we know the scalable vector is large
enough to contain the subvector.

Fixes https://github.com/llvm/llvm-project/issues/63437

Reviewed By: craig.topper

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




More information about the All-commits mailing list