[llvm] [VPlan] Introduce recipes for VP loads and stores. (PR #87816)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 08:04:17 PDT 2024
================
@@ -1336,6 +1332,30 @@ void VPlanTransforms::addExplicitVectorLength(VPlan &Plan) {
NextEVLIV->insertBefore(CanonicalIVIncrement);
EVLPhi->addOperand(NextEVLIV);
+ forAllHeaderPredicates(Plan, [VPEVL](VPInstruction &Mask) {
----------------
fhahn wrote:
> An alternative approach would be to scan the recipes inside the loop, replacing every widen memory recipe with its vp counterpart, where header masks are replaced with null. Before doing so, collect all header masks into a set, possibly via forAllHeaderPredicates(), which could be simplified into collectAllHeaderPredicates(), until a designated recipe can be use directly.
Updated to use `collectAllHeaderPredicates` (`collectAllHeaderMasks`), but kept walking those users for now. Can also revert back to iterating over the whole vector loop region as was done in earlier versions of the patch if preferred.
https://github.com/llvm/llvm-project/pull/87816
More information about the llvm-commits
mailing list