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

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 19 06:36:47 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),
----------------
nemanjai wrote:

It has a couple of uses in static asserts in TargetLowering and LegalizeTypes. Those can probably be removed considering how this is computed.
I just didn't remove them since the static asserts are basically free checks that some misguided update to how this is defined in the future doesn't allow the enum to grow past the amount of space allocated for it.

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


More information about the llvm-commits mailing list