[PATCH] D144434: [VPlan] Handle invariant GEPs in isUniformAfterVectorization.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 08:33:23 PST 2023


reames added a comment.

I think there's a deeper logic issue here.  I'm pretty sure this is a bug I introduced, so, sorry!

LoopAccessInfo::isUniform uses SCEV's notion of loop invariant.  This is both things which are currently loop invariant, but also things whose computation is loop invariant (e.g. uniform).

As you noticed, VPReplicateRecipe::execute uses only whether the recipe was defined.  This is essentially a proxy for whether an instructions *placement* was loop invariant.  This explicitly *does not* reason about computation.  (I think... this part of things I'm less confident in.)

I think the basic issue here is that a Recipe can correspond to the isUniform Value without itself being uniform-per-part or UniformAfterVectorization.  So, I think your change is patching over a bug, not fixing one.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144434/new/

https://reviews.llvm.org/D144434



More information about the llvm-commits mailing list