[PATCH] D144491: [VPlan] Use isUniformAfterVec in VPReplicateRecipe::execute.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 10:12:34 PDT 2023


fhahn updated this revision to Diff 523836.
fhahn marked 2 inline comments as done.
fhahn added a comment.

Address comments and rebase, plan to land it soon.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144491

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp


Index: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -9569,9 +9569,10 @@
     return;
   }
 
-  // A store of a loop varying value to a loop invariant address only
-  // needs only the last copy of the store.
-  if (isa<StoreInst>(UI) && getOperand(1)->isLiveIn()) {
+  // A store of a loop varying value to a uniform address only needs the last
+  // copy of the store.
+  if (isa<StoreInst>(UI) &&
+      vputils::isUniformAfterVectorization(getOperand(1))) {
     auto Lane = VPLane::getLastLaneForVF(State.VF);
     State.ILV->scalarizeInstruction(UI, this, VPIteration(State.UF - 1, Lane),
                                     State);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144491.523836.patch
Type: text/x-patch
Size: 817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230519/5c0eb6a9/attachment.bin>


More information about the llvm-commits mailing list