[all-commits] [llvm/llvm-project] 457da7: [SelectionDAG] Relax constraints on STEP_VECTOR st...

Fraser Cormack via All-commits all-commits at lists.llvm.org
Tue Apr 20 00:49:13 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 457da7f298fe0081d2b0dde8f3ca1a472ea35754
      https://github.com/llvm/llvm-project/commit/457da7f298fe0081d2b0dde8f3ca1a472ea35754
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2021-04-20 (Tue, 20 Apr 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/ISDOpcodes.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    R llvm/test/CodeGen/RISCV/rvv/stepvector-rv32.ll
    R llvm/test/CodeGen/RISCV/rvv/stepvector-rv64.ll
    A llvm/test/CodeGen/RISCV/rvv/stepvector.ll

  Log Message:
  -----------
  [SelectionDAG] Relax constraints on STEP_VECTOR step operand

This patch relaxes the requirement that the STEP_VECTOR step constant
must be of a type at least as large as the vector element type. This
does not permit its use on targets which have legal vector element types
larger than the largest legal scalar type, such as i64 vectors on RV32.

As such, the requirement has been loosened so that the step operand must
be any scalar type so long as the constant immediate is non-negative and
the value fits inside the vector element type.

This limits combining optimizations in certain circumstances but in
practice it's unlikely to be a hindrance.

Reviewed By: paulwalker-arm

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




More information about the All-commits mailing list