@@ -34,8 +34,9 @@ def IsFixedVectorTypePred : CPred<[{::llvm::isa<::mlir::VectorType>($_self) &&
3434 !::llvm::cast<VectorType>($_self).isScalable()}]>;
3535
3636// Whether a type is a scalable VectorType.
37- def IsScalableVectorTypePred : CPred<[{::llvm::isa<::mlir::VectorType>($_self) &&
38- ::llvm::cast<VectorType>($_self).isScalable()}]>;
37+ def IsVectorTypeWithAnyDimScalablePred
38+ : CPred<[{::llvm::isa<::mlir::VectorType>($_self) &&
39+ ::llvm::cast<VectorType>($_self).isScalable()}]>;
3940
4041// Whether a type is a scalable VectorType, with a single trailing scalable dimension.
4142// Examples:
@@ -51,7 +52,7 @@ def IsVectorTypeWithOnlyTrailingDimScalablePred : And<[
5152]>;
5253
5354// Whether a type is a VectorType and all dimensions are scalable.
54- def allDimsScalableVectorTypePred : And<[
55+ def IsVectorTypeWithAllDimsScalablePred : And<[
5556 IsVectorTypePred,
5657 CPred<[{::llvm::cast<::mlir::VectorType>($_self).allDimsScalable()}]>
5758]>;
@@ -414,7 +415,7 @@ class FixedVectorOf<list<Type> allowedTypes> :
414415 "fixed-length vector", "::mlir::VectorType">;
415416
416417class ScalableVectorOf<list<Type> allowedTypes> :
417- ShapedContainerType<allowedTypes, IsScalableVectorTypePred ,
418+ ShapedContainerType<allowedTypes, IsVectorTypeWithAnyDimScalablePred ,
418419 "scalable vector", "::mlir::VectorType">;
419420
420421// Any vector with a single trailing scalable dimension, with an element type in
@@ -447,7 +448,7 @@ class IsFixedVectorOfRankPred<list<int> allowedRanks> :
447448// Whether the number of elements of a scalable vector is from the given
448449// `allowedRanks` list
449450class IsScalableVectorOfRankPred<list<int> allowedRanks> :
450- And<[IsScalableVectorTypePred ,
451+ And<[IsVectorTypeWithAnyDimScalablePred ,
451452 Or<!foreach(allowedlength, allowedRanks,
452453 CPred<[{::llvm::cast<::mlir::VectorType>($_self).getRank()
453454 == }]
@@ -497,7 +498,7 @@ class IsFixedVectorOfLengthPred<list<int> allowedLengths> :
497498// Whether the number of elements of a scalable vector is from the given
498499// `allowedLengths` list
499500class IsScalableVectorOfLengthPred<list<int> allowedLengths> :
500- And<[IsScalableVectorTypePred ,
501+ And<[IsVectorTypeWithAnyDimScalablePred ,
501502 Or<!foreach(allowedlength, allowedLengths,
502503 CPred<[{::llvm::cast<::mlir::VectorType>($_self).getNumElements()
503504 == }]
0 commit comments