This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Relax constraints on STEP_VECTOR step operand
ClosedPublic

Authored by frasercrmck on Apr 16 2021, 9:19 AM.

Details

Summary

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.

Diff Detail

Event Timeline

frasercrmck created this revision.Apr 16 2021, 9:19 AM
frasercrmck requested review of this revision.Apr 16 2021, 9:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 16 2021, 9:19 AM
paulwalker-arm accepted this revision.Apr 19 2021, 4:12 AM
This revision is now accepted and ready to land.Apr 19 2021, 4:12 AM
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp