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

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 21:10:13 PDT 2022


reames 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:
> 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.  


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