[llvm] [VPlan] Hoist predicated loads with complementary masks. (PR #168373)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 03:36:29 PST 2025
================
@@ -3974,6 +3974,152 @@ void VPlanTransforms::hoistInvariantLoads(VPlan &Plan) {
}
}
+// Returns the intersection of metadata from a group of loads.
+static VPIRMetadata getCommonLoadMetadata(ArrayRef<VPReplicateRecipe *> Loads) {
+ VPIRMetadata CommonMetadata = *Loads.front();
+ for (VPReplicateRecipe *Load : drop_begin(Loads))
+ CommonMetadata.intersect(*Load);
+ return CommonMetadata;
----------------
artagnon wrote:
Would be good to factor this into a VPIRMetadata::intersect_range?
https://github.com/llvm/llvm-project/pull/168373
More information about the llvm-commits
mailing list