[PATCH] D147259: [LV] Don't sink scalar instructions that may read from memory.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 16 12:38:55 PDT 2023
Ayal accepted this revision.
Ayal added a comment.
This revision is now accepted and ready to land.
Looks good to me, thanks for fixing! Worth mentioning that this fixes a bug?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4169
// We can't sink an instruction if it is a phi node, is not in the loop,
// or may have side effects.
if (!I || isa<PHINode>(I) || !VectorLoop->contains(I) ||
----------------
nit: // ... or may read from memory.
Worth adding a TODO to allow sinking a load past non-store instructions? (Could potentially also sink obstructing stores as well(?)) Better during VPlan-to-VPlan sinking.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147259/new/
https://reviews.llvm.org/D147259
More information about the llvm-commits
mailing list