[PATCH] D87424: [SVE] Bail from VectorUtils heuristics for scalable vectors

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 17:46:26 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Analysis/VectorUtils.cpp:908
 /// vectors.  Is there something we can common this with?
-APInt llvm::possiblyDemandedEltsInMask(Value *Mask) {
+Optional<APInt> llvm::possiblyDemandedEltsInMask(Value *Mask) {
+  if (isa<ScalableVectorType>(Mask->getType()))
----------------
I think I'd prefer to handle this in the callers: if the vector is scalable, just don't call it.  Returning an Optional<> is more confusing, I think, since it can't fail for fixed vectors.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87424



More information about the llvm-commits mailing list