[llvm] [VPlan] Extend licm to hoist replicate loads (PR #179506)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 17 09:17:56 PDT 2026
================
@@ -2695,7 +2723,9 @@ static void licm(VPlan &Plan) {
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
vp_depth_first_shallow(LoopRegion->getEntry()))) {
for (VPRecipeBase &R : make_early_inc_range(*VPBB)) {
- if (cannotHoistOrSinkRecipe(R))
+ if (cannotHoistOrSinkRecipe(R, LoadGroups,
+ LoopRegion->getEntryBasicBlock(),
+ LoopRegion->getExitingBasicBlock()))
----------------
artagnon wrote:
Hm, I think the return value of the sink function is a more complex version of the legality check we have here? canSinkOrHoistInst checks if a recipe can be mechanically hoisted or sunk, similar to cannotHoistOrSinkRecipe?
https://github.com/llvm/llvm-project/pull/179506
More information about the llvm-commits
mailing list