@@ -297,46 +297,39 @@ def IIT_MMX : IIT_VT<x86mmx, 17>;
297297def IIT_TOKEN : IIT_VT<token, 18>;
298298def IIT_METADATA : IIT_VT<MetadataVT, 19>;
299299def IIT_EMPTYSTRUCT : IIT_VT<OtherVT, 20>;
300- def IIT_STRUCT2 : IIT_Base<21>;
301- def IIT_STRUCT3 : IIT_Base<22>;
302- def IIT_STRUCT4 : IIT_Base<23>;
303- def IIT_STRUCT5 : IIT_Base<24>;
304- def IIT_EXTEND_ARG : IIT_Base<25>;
305- def IIT_TRUNC_ARG : IIT_Base<26>;
306- def IIT_ANYPTR : IIT_Base<27>;
307- def IIT_V1 : IIT_Vec<1, 28>;
308- def IIT_VARARG : IIT_VT<isVoid, 29>;
309- def IIT_ONE_NTH_ELTS_VEC_ARG : IIT_Base<30>;
310- def IIT_SAME_VEC_WIDTH_ARG : IIT_Base<31>;
311- def IIT_VEC_OF_ANYPTRS_TO_ELT : IIT_Base<34>;
312- def IIT_I128 : IIT_Int<128, 35>;
313- def IIT_V512 : IIT_Vec<512, 36>;
314- def IIT_V1024 : IIT_Vec<1024, 37>;
315- def IIT_STRUCT6 : IIT_Base<38>;
316- def IIT_STRUCT7 : IIT_Base<39>;
317- def IIT_STRUCT8 : IIT_Base<40>;
318- def IIT_F128 : IIT_VT<f128, 41>;
319- def IIT_VEC_ELEMENT : IIT_Base<42>;
320- def IIT_SCALABLE_VEC : IIT_Base<43>;
321- def IIT_SUBDIVIDE2_ARG : IIT_Base<44>;
322- def IIT_SUBDIVIDE4_ARG : IIT_Base<45>;
323- def IIT_VEC_OF_BITCASTS_TO_INT : IIT_Base<46>;
324- def IIT_V128 : IIT_Vec<128, 47>;
325- def IIT_BF16 : IIT_VT<bf16, 48>;
326- def IIT_STRUCT9 : IIT_Base<49>;
327- def IIT_V256 : IIT_Vec<256, 50>;
328- def IIT_AMX : IIT_VT<x86amx, 51>;
329- def IIT_PPCF128 : IIT_VT<ppcf128, 52>;
330- def IIT_V3 : IIT_Vec<3, 53>;
331- def IIT_EXTERNREF : IIT_VT<externref, 54>;
332- def IIT_FUNCREF : IIT_VT<funcref, 55>;
333- def IIT_I2 : IIT_Int<2, 57>;
334- def IIT_I4 : IIT_Int<4, 58>;
335- def IIT_AARCH64_SVCOUNT : IIT_VT<aarch64svcount, 59>;
336- def IIT_V6 : IIT_Vec<6, 60>;
337- def IIT_V10 : IIT_Vec<10, 61>;
338- def IIT_V2048 : IIT_Vec<2048, 62>;
339- def IIT_V4096 : IIT_Vec<4096, 63>;
300+ def IIT_STRUCT : IIT_Base<21>;
301+ def IIT_EXTEND_ARG : IIT_Base<22>;
302+ def IIT_TRUNC_ARG : IIT_Base<23>;
303+ def IIT_ANYPTR : IIT_Base<24>;
304+ def IIT_V1 : IIT_Vec<1, 25>;
305+ def IIT_VARARG : IIT_VT<isVoid, 26>;
306+ def IIT_ONE_NTH_ELTS_VEC_ARG : IIT_Base<27>;
307+ def IIT_SAME_VEC_WIDTH_ARG : IIT_Base<28>;
308+ def IIT_VEC_OF_ANYPTRS_TO_ELT : IIT_Base<29>;
309+ def IIT_I128 : IIT_Int<128, 30>;
310+ def IIT_V512 : IIT_Vec<512, 31>;
311+ def IIT_V1024 : IIT_Vec<1024, 32>;
312+ def IIT_F128 : IIT_VT<f128, 33>;
313+ def IIT_VEC_ELEMENT : IIT_Base<34>;
314+ def IIT_SCALABLE_VEC : IIT_Base<35>;
315+ def IIT_SUBDIVIDE2_ARG : IIT_Base<36>;
316+ def IIT_SUBDIVIDE4_ARG : IIT_Base<37>;
317+ def IIT_VEC_OF_BITCASTS_TO_INT : IIT_Base<38>;
318+ def IIT_V128 : IIT_Vec<128, 39>;
319+ def IIT_BF16 : IIT_VT<bf16, 40>;
320+ def IIT_V256 : IIT_Vec<256, 41>;
321+ def IIT_AMX : IIT_VT<x86amx, 42>;
322+ def IIT_PPCF128 : IIT_VT<ppcf128, 43>;
323+ def IIT_V3 : IIT_Vec<3, 44>;
324+ def IIT_EXTERNREF : IIT_VT<externref, 45>;
325+ def IIT_FUNCREF : IIT_VT<funcref, 46>;
326+ def IIT_I2 : IIT_Int<2, 47>;
327+ def IIT_I4 : IIT_Int<4, 48>;
328+ def IIT_AARCH64_SVCOUNT : IIT_VT<aarch64svcount, 49>;
329+ def IIT_V6 : IIT_Vec<6, 50>;
330+ def IIT_V10 : IIT_Vec<10, 51>;
331+ def IIT_V2048 : IIT_Vec<2048, 52>;
332+ def IIT_V4096 : IIT_Vec<4096, 53>;
340333}
341334
342335defvar IIT_all_FixedTypes = !filter(iit, IIT_all,
@@ -345,19 +338,6 @@ defvar IIT_all_FixedTypes = !filter(iit, IIT_all,
345338defvar IIT_all_VectorTypes = !filter(iit, IIT_all,
346339 !isa<IIT_Vec>(iit));
347340
348- defvar IIT_RetNumbers = [
349- [IIT_Done.Number],
350- []<int>,
351- [IIT_STRUCT2.Number],
352- [IIT_STRUCT3.Number],
353- [IIT_STRUCT4.Number],
354- [IIT_STRUCT5.Number],
355- [IIT_STRUCT6.Number],
356- [IIT_STRUCT7.Number],
357- [IIT_STRUCT8.Number],
358- [IIT_STRUCT9.Number],
359- ];
360-
361341//===----------------------------------------------------------------------===//
362342// Types used by intrinsics.
363343//===----------------------------------------------------------------------===//
@@ -663,7 +643,10 @@ class TypeInfoGen<
663643 !if(!isa<LLVMMatchType>(ty), ACTys[MappingRIdxs[ty.Number]], ty));
664644
665645 list<int> TypeSig = !listflatten(!listconcat(
666- [IIT_RetNumbers[!size(RetTypes)]],
646+ [!cond(
647+ !eq(!size(RetTypes), 0): [IIT_Done.Number],
648+ !eq(!size(RetTypes), 1): []<int>,
649+ true: [IIT_STRUCT.Number, !sub(!size(RetTypes), 2)])],
667650 !foreach(i, !range(AllTypes),
668651 !foreach(a, AllTypes[i].Sig,
669652 ResolveArgCode<
0 commit comments