[llvm] [Intrinsic] Unify IIT_STRUCT{2-9} into ITT_STRUCT to support upto 257 return value (PR #160434)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 26 06:48:15 PDT 2025


================
@@ -390,32 +390,13 @@ DecodeIITType(unsigned &NextElt, ArrayRef<unsigned char> Infos,
   case IIT_EMPTYSTRUCT:
     OutputTable.push_back(IITDescriptor::get(IITDescriptor::Struct, 0));
     return;
-  case IIT_STRUCT9:
-    ++StructElts;
-    [[fallthrough]];
-  case IIT_STRUCT8:
-    ++StructElts;
-    [[fallthrough]];
-  case IIT_STRUCT7:
-    ++StructElts;
-    [[fallthrough]];
-  case IIT_STRUCT6:
-    ++StructElts;
-    [[fallthrough]];
-  case IIT_STRUCT5:
-    ++StructElts;
-    [[fallthrough]];
-  case IIT_STRUCT4:
-    ++StructElts;
-    [[fallthrough]];
-  case IIT_STRUCT3:
-    ++StructElts;
-    [[fallthrough]];
-  case IIT_STRUCT2: {
+  case IIT_STRUCT: {
+    StructElts += Infos[NextElt++];
+
     OutputTable.push_back(
         IITDescriptor::get(IITDescriptor::Struct, StructElts));
 
-    for (unsigned i = 0; i != StructElts; ++i)
+    for (unsigned i = 0; i < StructElts; ++i)
----------------
jurahul wrote:

why change this?

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


More information about the llvm-commits mailing list