File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
llvm/include/llvm/CodeGenTypes Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,9 @@ class LLT {
146146 constexpr bool isScalar () const { return IsScalar; }
147147 constexpr bool isToken () const { return IsScalar && RawData == 0 ; };
148148 constexpr bool isVector () const { return isValid () && IsVector; }
149+ constexpr bool isScalar (unsigned Size) const {
150+ return isScalar () && getScalarSizeInBits () == Size;
151+ }
149152 constexpr bool isPointer () const {
150153 return isValid () && IsPointer && !IsVector;
151154 }
@@ -176,6 +179,12 @@ class LLT {
176179 // / if the LLT is not a vector type.
177180 constexpr bool isFixedVector () const { return isVector () && !isScalable (); }
178181
182+ constexpr bool isFixedVector (unsigned NumElements,
183+ unsigned ScalarSize) const {
184+ return isFixedVector () && getNumElements () == NumElements &&
185+ getScalarSizeInBits () == ScalarSize;
186+ }
187+
179188 // / Returns true if the LLT is a scalable vector. Returns false otherwise,
180189 // / even if the LLT is not a vector type.
181190 constexpr bool isScalableVector () const { return isVector () && isScalable (); }
You can’t perform that action at this time.
0 commit comments