[LV] Use available masked vector function variants when required
authorGraham Hunter <graham.hunter@arm.com>
Fri, 16 Sep 2022 14:23:18 +0000 (15:23 +0100)
committerGraham Hunter <graham.hunter@arm.com>
Wed, 5 Apr 2023 10:18:38 +0000 (11:18 +0100)
commit185863f7de7c53358c535cd51783ea4e7de214b2
treec6d9fd686fc695af818f25140ff76239b2a62deb
parent7f05bdf4ee1c4a6779ecde1e44a889c4cef72269
[LV] Use available masked vector function variants when required

LLVM has the ability to vectorize using function variants that require
a mask by creating an all-true mask, and to vectorize a conditional
call via scalarization, now we want to join the two parts together
and use a masked variant when a mask is required.

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D136251
llvm/include/llvm/Analysis/VectorUtils.h
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
llvm/test/Transforms/LoopVectorize/AArch64/masked-call.ll
llvm/test/Transforms/LoopVectorize/scalarize-masked-call.ll