[llvm] [MVT][TableGen] Extend Machine Value Type to `uint16_t` (PR #99657)

Brandon Wu via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 18:28:44 PDT 2024


================
@@ -599,7 +600,8 @@ unsigned MatcherTableEmitter::EmitMatcher(const Matcher *N,
         IdxSize = 2; // size of opcode in table is 2 bytes.
       } else {
         Child = cast<SwitchTypeMatcher>(N)->getCaseMatcher(i);
-        IdxSize = 1; // size of type in table is 1 byte.
+        IdxSize = GetVBRSize(cast<SwitchTypeMatcher>(N)->getCaseType(
+            i)); // size of type in table is sizeof(MVT) byte.
----------------
4vtomat wrote:

Yes, it should be VBR(MVT).

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


More information about the llvm-commits mailing list