[llvm] [LLT] Add and use isPointerVector and isPointerOrPointerVector. NFC. (PR #81283)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 09:50:14 PST 2024


================
@@ -134,15 +134,17 @@ class LLT {
 
   explicit LLT(MVT VT);
 
-  constexpr bool isValid() const { return IsScalar || RawData != 0; }
+  constexpr bool isValid() const { return IsScalar || IsPointer || IsVector; }
----------------
jayfoad wrote:

Writing `isValid` this way just makes it clear that there is no need to call it from the other `is` methods below, since they are all testing at least one of the `Is` flags already.

https://github.com/llvm/llvm-project/pull/81283


More information about the llvm-commits mailing list