[PATCH] D102515: [CostModel] Return an invalid cost for memory ops with unsupported types
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 19 01:04:56 PDT 2021
sdesmalen added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1324
+ /// \returns True if it is legal to vectorize the given element type.
+ bool isLegalToVectorizeElementType(Type *Ty, bool VectorIsScalable) const;
+
----------------
david-arm wrote:
> sdesmalen wrote:
> > Does it ever make sense to call this function with `VectorIsScalable=false` given that fixed-width vectors can fall back on scalarization?
> > If not, should this then become: `isElementTypeLegalForScalableVector(Type *Ty)` ?
> I wonder if there may be a possibility in future where a scalable vector supports something that a fixed width one doesn't, e.g. not related specifically to scalarisation?
But then I imagine it would still be legal to vectorize, because fixed-width can fall back on scalarization. It would then be up to the cost-model to say which one is more profitable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102515/new/
https://reviews.llvm.org/D102515
More information about the llvm-commits
mailing list