[llvm] [VPlan] Extend licm to hoist replicate loads (PR #179506)
Andrei Elovikov via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 10:57:05 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()))
----------------
eas wrote:
So for non-loop-invariant loads this returns "we can hoist them" and we only bail out later in the check on line 2730? That is a very confusing way to structure the code/name functions.
https://github.com/llvm/llvm-project/pull/179506
More information about the llvm-commits
mailing list