[PATCH] D125747: [RISCV] Enable scalable vectorization by default for RVV

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 22:11:55 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/RISCV/unroll-in-loop-vectorizer.ll:6
 ;
 define void @small_loop(i32* nocapture %inArray, i32 %size) nounwind {
 ; CHECK-LABEL: @small_loop(
----------------
reames wrote:
> reames wrote:
> > As an aside, I took a look at the assembly for this example.  Th codegen for the vector loop ends up being less than great.  For instance:
> > * We have a extend trapped in the loop for some reason
> > * We rerun vsetvli on every iteration (despite it producing a fixed result)
> > * We have a rem in the vector preheader.  That's rather expensive.  (Well, actually, we end up with a *libcall* because the attributes don't include +m, but I ignored that.)
> To be fair, the first two issues also exist with fixed length vectorization of the same example.  
What kind of extend?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125747



More information about the llvm-commits mailing list