[PATCH] D100660: [SelectionDAG] Relax constraints on STEP_VECTOR step operand

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 16 09:19:19 PDT 2021


frasercrmck created this revision.
frasercrmck added reviewers: david-arm, paulwalker-arm, fhahn, kmclaughlin, craig.topper, ctetreau.
Herald added subscribers: ecnelises, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
frasercrmck requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100660

Files:
  llvm/include/llvm/CodeGen/ISDOpcodes.h
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/test/CodeGen/RISCV/rvv/stepvector-rv32.ll
  llvm/test/CodeGen/RISCV/rvv/stepvector-rv64.ll
  llvm/test/CodeGen/RISCV/rvv/stepvector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100660.338148.patch
Type: text/x-patch
Size: 12133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210416/405724bc/attachment.bin>


More information about the llvm-commits mailing list