[PATCH] D99509: [RISCV] Add legality check for vectoring reduction

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 5 10:20:07 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h:133
+    if (!VF.isScalable())
+      return true;
+
----------------
luke957 wrote:
> craig.topper wrote:
> > This is returning true for not scalable. Is that saying that any fixed length reduction is supported?
> I understand returning true for not scalable is just to make canVectorizeReductions() in  LoopVectorizer.cpp return right value. There will be other checks after canVectorizeReductions() returns.
Let me rephrase a little. You're returning true for fixed vectors, but not checking element type or opcode or hasStdExtV. Does the the mean the vectorizer will start generating reductions for vectors of i128. Or reductions of floats when the F extension isn't enabled?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99509



More information about the llvm-commits mailing list