[PATCH] D116656: [LV] Use onlyFirstLaneDemanded when widening pointer phis (NFCI).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 03:06:44 PST 2022


fhahn updated this revision to Diff 404467.
fhahn added a comment.

Rebase on top of recent changes


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116656

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
@@ -4502,7 +4502,7 @@
       // Determine the number of scalars we need to generate for each unroll
       // iteration. If the instruction is uniform, we only need to generate the
       // first lane. Otherwise, we generate all VF values.
-      bool IsUniform = Cost->isUniformAfterVectorization(P, State.VF);
+      bool IsUniform = vputils::onlyFirstLaneUsed(PhiR);
       assert((IsUniform || !State.VF.isScalable()) &&
              "Cannot scalarize a scalable VF");
       unsigned Lanes = IsUniform ? 1 : State.VF.getFixedValue();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116656.404467.patch
Type: text/x-patch
Size: 768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220131/2e0fdd88/attachment.bin>


More information about the llvm-commits mailing list