[PATCH] D85794: [WIP][llvm][LV] Replace `unsigned VF` with `ElementCount VF` [NFCI]

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 22:50:54 PDT 2020


rogfer01 added a comment.

Hi @fpetrogalli, thanks for this proposal.

We had to do similar things when we applied the LoopVectorizer to RISC-V V-ext. However we didn't use `ElementCount` so our version looks much less neat than your approach.

I think this direction makes a lot of sense.



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1250
     // Do the analysis once.
-    if (VF == 1 || Uniforms.find(VF) != Uniforms.end())
+    if ((VF == 1 && !VF.Scalable) || Uniforms.find(VF) != Uniforms.end())
       return;
----------------
Can we use `VF.isScalar()` here as well or I am missing something?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85794



More information about the llvm-commits mailing list