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

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 10:13:14 PDT 2024


================
@@ -2896,8 +2896,10 @@ CheckChild2CondCode(const unsigned char *MatcherTable, unsigned &MatcherIndex,
 LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
 CheckValueType(const unsigned char *MatcherTable, unsigned &MatcherIndex,
                SDValue N, const TargetLowering *TLI, const DataLayout &DL) {
-  MVT::SimpleValueType VT =
-      static_cast<MVT::SimpleValueType>(MatcherTable[MatcherIndex++]);
+  unsigned SimpleVT = MatcherTable[MatcherIndex++];
----------------
wangpc-pp wrote:

This can be extracted as a static inline helper function.

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


More information about the llvm-commits mailing list