[llvm] [SelectionDAG][WIP] Move HwMode expansion from tablegen to SelectionISel. (PR #174471)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 5 22:10:25 PST 2026


================
@@ -2747,6 +2751,18 @@ getSimpleVT(const uint8_t *MatcherTable, unsigned &MatcherIndex) {
   return static_cast<MVT::SimpleValueType>(SimpleVT);
 }
 
+/// getSimpleVT - Decode a value in MatcherTable, if it's a VBR encoded value,
+/// use GetVBR to decode it.
+LLVM_ATTRIBUTE_ALWAYS_INLINE static MVT
+getHwModeVT(const uint8_t *MatcherTable, unsigned &MatcherIndex,
+                   const SelectionDAGISel &SDISel) {
+  unsigned Index = MatcherTable[MatcherIndex++];
+  if (Index & 128)
----------------
wangpc-pp wrote:

If it is always small, I prefer to to make it fixed to save some compile time.

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


More information about the llvm-commits mailing list