[ARM] Allow tail predication of VLDn
authorDavid Green <david.green@arm.com>
Tue, 18 Aug 2020 16:15:45 +0000 (17:15 +0100)
committerDavid Green <david.green@arm.com>
Tue, 18 Aug 2020 16:15:45 +0000 (17:15 +0100)
commit3471520b1f6bc4fedfe45505f02924dc44e5106f
treeab3286e375f2b9b5698cc26e26ecadf9423e24b6
parent7baed769c7ea8de27a1c077c7ff30f4e19988ade
[ARM] Allow tail predication of VLDn

VLD2/4 instructions cannot be predicated, so we cannot tail predicate
them from autovec. From intrinsics though, they should be valid as they
will just end up loading extra values into off vector lanes, not
effecting the on lanes. The same is true for loads in general where so
long as we are not using the other vector lanes, an unpredicated load
can be converted to a predicated one.

This marks VLD2 and VLD4 instructions as validForTailPredication and
allows any unpredicated load in tail predication loop, which seems to be
valid given the other checks we have.

Differential Revision: https://reviews.llvm.org/D86022
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
llvm/test/CodeGen/Thumb2/LowOverheadLoops/unpredload.ll
llvm/unittests/Target/ARM/MachineInstrTest.cpp