[llvm] [MVT] Expand the MVT enum to allow more types (PR #69603)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 19 06:57:14 PDT 2023


================
@@ -48,8 +48,8 @@ namespace llvm {
 
       // This is the current maximum for LAST_VALUETYPE.
       // MVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors
-      // This value must be a multiple of 32.
-      MAX_ALLOWED_VALUETYPE = 224,
+      // This value must be a multiple of 64.
+      MAX_ALLOWED_VALUETYPE = 64 * ((VALUETYPE_SIZE + 63) / 64),
----------------
jayfoad wrote:

I consider the static asserts to be useless if they are checking a value that has no "real" uses. And this value only has one real use, in CodeGenDAGPatterns, which could easily do its own asserts or just make sure that the value is correct by construction.

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


More information about the llvm-commits mailing list