[ARM] Convert active.lane.masks to vctp with non-zero starts
authorDavid Green <david.green@arm.com>
Wed, 29 Mar 2023 13:17:10 +0000 (14:17 +0100)
committerDavid Green <david.green@arm.com>
Wed, 29 Mar 2023 13:17:10 +0000 (14:17 +0100)
commiteb64450afc96730f9a6ff87c817c34185a307a0f
tree56968f80ec5c0428f0bac997d62a3d939c2cee4a
parentac269d185c38ceadfff38c1573334b8d3415f56a
[ARM] Convert active.lane.masks to vctp with non-zero starts

This attempts to expand the logic in the MVETailPredication pass to convert
active lane masks that the vectorizer produces to vctp instructions that the
backend can later turn into tail predicated loops. Especially for addrecs with
non-zero starts that can be created from epilog vectorization. There is some
adjustment to the logic to handle this, moving some of the code to check the
addrec earlier so that we can get the start value. This start value is then
incorporated into the logic of checkin the new vctp is valid, and there is a
newly added check that it is known to be a multiple of the VF as we expect.

Differential Revision: https://reviews.llvm.org/D146517
llvm/lib/Target/ARM/MVETailPredication.cpp
llvm/test/CodeGen/Thumb2/LowOverheadLoops/varying-outer-2d-reduction.ll
llvm/test/CodeGen/Thumb2/mve-laneinterleaving-reduct.ll
llvm/test/CodeGen/Thumb2/mve-tailpred-nonzerostart.ll