[ARM] Convert VPSEL to VMOV in tail predicated loops
authorDavid Green <david.green@arm.com>
Mon, 3 Aug 2020 21:03:14 +0000 (22:03 +0100)
committerDavid Green <david.green@arm.com>
Mon, 3 Aug 2020 21:03:14 +0000 (22:03 +0100)
commit22916481c11e1d46132752086290a668e62fc9ce
tree8c8aa7199a63229ad9a031c8914cb04afdce97b6
parentcb327922101b28ea70ec68d7f026da0e5e388eed
[ARM] Convert VPSEL to VMOV in tail predicated loops

VPSEL has slightly different semantics under tail predication (it can
end up selecting from Qn, Qm and Qd). We do not model that at the moment
so they block tail predicated loops from being formed.

This just converts them into a predicated VMOV instead (via a VORR),
allowing tail predication to happen whilst still modelling the original
behaviour of the input.

Differential Revision: https://reviews.llvm.org/D85110
llvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp
llvm/test/CodeGen/Thumb2/LowOverheadLoops/cond-vector-reduce-mve-codegen.ll
llvm/test/CodeGen/Thumb2/mve-pred-selectop3.ll
llvm/test/CodeGen/Thumb2/mve-pred-vctpvpsel.ll
llvm/test/CodeGen/Thumb2/mve-vctp.ll