reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/IR/AutoUpgrade.cpp
 1658     assert(Name.startswith("llvm.") && "Intrinsic doesn't start with 'llvm.'");
 1659     Name = Name.substr(5);
 1659     Name = Name.substr(5);
 1661     bool IsX86 = Name.startswith("x86.");
 1663       Name = Name.substr(4);
 1663       Name = Name.substr(4);
 1664     bool IsNVVM = Name.startswith("nvvm.");
 1666       Name = Name.substr(5);
 1666       Name = Name.substr(5);
 1668     if (IsX86 && Name.startswith("sse4a.movnt.")) {
 1694     if (IsX86 && (Name.startswith("avx.movnt.") ||
 1695                   Name.startswith("avx512.storent."))) {
 1719     if (IsX86 && Name == "sse2.storel.dq") {
 1736     if (IsX86 && (Name.startswith("sse.storeu.") ||
 1737                   Name.startswith("sse2.storeu.") ||
 1738                   Name.startswith("avx.storeu."))) {
 1752     if (IsX86 && Name == "avx512.mask.store.ss") {
 1762     if (IsX86 && (Name.startswith("avx512.mask.store"))) {
 1764       bool Aligned = Name[17] != 'u'; // "avx512.mask.storeu".
 1775     if (IsX86 && (Name.startswith("sse2.pcmp") ||
 1776                   Name.startswith("avx2.pcmp"))) {
 1778       bool CmpEq = Name[9] == 'e';
 1782     } else if (IsX86 && (Name.startswith("avx512.broadcastm"))) {
 1790     } else if (IsX86 && (Name == "sse.sqrt.ss" ||
 1791                          Name == "sse2.sqrt.sd")) {
 1798     } else if (IsX86 && (Name.startswith("avx.sqrt.p") ||
 1799                          Name.startswith("sse2.sqrt.p") ||
 1800                          Name.startswith("sse.sqrt.p"))) {
 1805     } else if (IsX86 && (Name.startswith("avx512.mask.sqrt.p"))) {
 1809         Intrinsic::ID IID = Name[18] == 's' ? Intrinsic::x86_avx512_sqrt_ps_512
 1823     } else if (IsX86 && (Name.startswith("avx512.ptestm") ||
 1824                          Name.startswith("avx512.ptestnm"))) {
 1832         Name.startswith("avx512.ptestm") ? ICmpInst::ICMP_NE : ICmpInst::ICMP_EQ;
 1835     } else if (IsX86 && (Name.startswith("avx512.mask.pbroadcast"))){
 1841     } else if (IsX86 && (Name.startswith("avx512.kunpck"))) {
 1860     } else if (IsX86 && Name == "avx512.kand.w") {
 1865     } else if (IsX86 && Name == "avx512.kandn.w") {
 1871     } else if (IsX86 && Name == "avx512.kor.w") {
 1876     } else if (IsX86 && Name == "avx512.kxor.w") {
 1881     } else if (IsX86 && Name == "avx512.kxnor.w") {
 1887     } else if (IsX86 && Name == "avx512.knot.w") {
 1892                (Name == "avx512.kortestz.w" || Name == "avx512.kortestc.w")) {
 1892                (Name == "avx512.kortestz.w" || Name == "avx512.kortestc.w")) {
 1898       if (Name[14] == 'c')
 1904     } else if (IsX86 && (Name == "sse.add.ss" || Name == "sse2.add.sd" ||
 1904     } else if (IsX86 && (Name == "sse.add.ss" || Name == "sse2.add.sd" ||
 1905                          Name == "sse.sub.ss" || Name == "sse2.sub.sd" ||
 1905                          Name == "sse.sub.ss" || Name == "sse2.sub.sd" ||
 1906                          Name == "sse.mul.ss" || Name == "sse2.mul.sd" ||
 1906                          Name == "sse.mul.ss" || Name == "sse2.mul.sd" ||
 1907                          Name == "sse.div.ss" || Name == "sse2.div.sd")) {
 1907                          Name == "sse.div.ss" || Name == "sse2.div.sd")) {
 1914       if (Name.contains(".add."))
 1916       else if (Name.contains(".sub."))
 1918       else if (Name.contains(".mul."))
 1924     } else if (IsX86 && Name.startswith("avx512.mask.pcmp")) {
 1926       bool CmpEq = Name[16] == 'e';
 1928     } else if (IsX86 && Name.startswith("avx512.mask.vpshufbitqmb.")) {
 1942     } else if (IsX86 && Name.startswith("avx512.mask.fpclass.p")) {
 1965     } else if (IsX86 && Name.startswith("avx512.mask.cmp.p")) {
 1995     } else if (IsX86 && Name.startswith("avx512.mask.cmp.") &&
 1996                Name[16] != 'p') {
 2000     } else if (IsX86 && Name.startswith("avx512.mask.ucmp.")) {
 2003     } else if (IsX86 && (Name.startswith("avx512.cvtb2mask.") ||
 2004                          Name.startswith("avx512.cvtw2mask.") ||
 2005                          Name.startswith("avx512.cvtd2mask.") ||
 2006                          Name.startswith("avx512.cvtq2mask."))) {
 2011     } else if(IsX86 && (Name == "ssse3.pabs.b.128" ||
 2012                         Name == "ssse3.pabs.w.128" ||
 2013                         Name == "ssse3.pabs.d.128" ||
 2014                         Name.startswith("avx2.pabs") ||
 2015                         Name.startswith("avx512.mask.pabs"))) {
 2017     } else if (IsX86 && (Name == "sse41.pmaxsb" ||
 2018                          Name == "sse2.pmaxs.w" ||
 2019                          Name == "sse41.pmaxsd" ||
 2020                          Name.startswith("avx2.pmaxs") ||
 2021                          Name.startswith("avx512.mask.pmaxs"))) {
 2023     } else if (IsX86 && (Name == "sse2.pmaxu.b" ||
 2024                          Name == "sse41.pmaxuw" ||
 2025                          Name == "sse41.pmaxud" ||
 2026                          Name.startswith("avx2.pmaxu") ||
 2027                          Name.startswith("avx512.mask.pmaxu"))) {
 2029     } else if (IsX86 && (Name == "sse41.pminsb" ||
 2030                          Name == "sse2.pmins.w" ||
 2031                          Name == "sse41.pminsd" ||
 2032                          Name.startswith("avx2.pmins") ||
 2033                          Name.startswith("avx512.mask.pmins"))) {
 2035     } else if (IsX86 && (Name == "sse2.pminu.b" ||
 2036                          Name == "sse41.pminuw" ||
 2037                          Name == "sse41.pminud" ||
 2038                          Name.startswith("avx2.pminu") ||
 2039                          Name.startswith("avx512.mask.pminu"))) {
 2041     } else if (IsX86 && (Name == "sse2.pmulu.dq" ||
 2042                          Name == "avx2.pmulu.dq" ||
 2043                          Name == "avx512.pmulu.dq.512" ||
 2044                          Name.startswith("avx512.mask.pmulu.dq."))) {
 2046     } else if (IsX86 && (Name == "sse41.pmuldq" ||
 2047                          Name == "avx2.pmul.dq" ||
 2048                          Name == "avx512.pmul.dq.512" ||
 2049                          Name.startswith("avx512.mask.pmul.dq."))) {
 2051     } else if (IsX86 && (Name == "sse.cvtsi2ss" ||
 2052                          Name == "sse2.cvtsi2sd" ||
 2053                          Name == "sse.cvtsi642ss" ||
 2054                          Name == "sse2.cvtsi642sd")) {
 2058     } else if (IsX86 && Name == "avx512.cvtusi2sd") {
 2062     } else if (IsX86 && Name == "sse2.cvtss2sd") {
 2066     } else if (IsX86 && (Name == "sse2.cvtdq2pd" ||
 2067                          Name == "sse2.cvtdq2ps" ||
 2068                          Name == "avx.cvtdq2.pd.256" ||
 2069                          Name == "avx.cvtdq2.ps.256" ||
 2070                          Name.startswith("avx512.mask.cvtdq2pd.") ||
 2071                          Name.startswith("avx512.mask.cvtudq2pd.") ||
 2072                          Name.startswith("avx512.mask.cvtdq2ps.") ||
 2073                          Name.startswith("avx512.mask.cvtudq2ps.") ||
 2074                          Name.startswith("avx512.mask.cvtqq2pd.") ||
 2075                          Name.startswith("avx512.mask.cvtuqq2pd.") ||
 2076                          Name == "avx512.mask.cvtqq2ps.256" ||
 2077                          Name == "avx512.mask.cvtqq2ps.512" ||
 2078                          Name == "avx512.mask.cvtuqq2ps.256" ||
 2079                          Name == "avx512.mask.cvtuqq2ps.512" ||
 2080                          Name == "sse2.cvtps2pd" ||
 2081                          Name == "avx.cvt.ps2.pd.256" ||
 2082                          Name == "avx512.mask.cvtps2pd.128" ||
 2083                          Name == "avx512.mask.cvtps2pd.256")) {
 2096       bool IsUnsigned = (StringRef::npos != Name.find("cvtu"));
 2115     } else if (IsX86 && (Name.startswith("avx512.mask.loadu."))) {
 2119     } else if (IsX86 && (Name.startswith("avx512.mask.load."))) {
 2123     } else if (IsX86 && Name.startswith("avx512.mask.expand.load.")) {
 2138     } else if (IsX86 && Name.startswith("avx512.mask.compress.store.")) {
 2153     } else if (IsX86 && (Name.startswith("avx512.mask.compress.") ||
 2154                          Name.startswith("avx512.mask.expand."))) {
 2160       bool IsCompress = Name[12] == 'c';
 2166     } else if (IsX86 && Name.startswith("xop.vpcom")) {
 2168       if (Name.endswith("ub") || Name.endswith("uw") || Name.endswith("ud") ||
 2168       if (Name.endswith("ub") || Name.endswith("uw") || Name.endswith("ud") ||
 2168       if (Name.endswith("ub") || Name.endswith("uw") || Name.endswith("ud") ||
 2169           Name.endswith("uq"))
 2171       else if (Name.endswith("b") || Name.endswith("w") || Name.endswith("d") ||
 2171       else if (Name.endswith("b") || Name.endswith("w") || Name.endswith("d") ||
 2171       else if (Name.endswith("b") || Name.endswith("w") || Name.endswith("d") ||
 2172                Name.endswith("q"))
 2181         Name = Name.substr(9); // strip off "xop.vpcom"
 2181         Name = Name.substr(9); // strip off "xop.vpcom"
 2182         if (Name.startswith("lt"))
 2184         else if (Name.startswith("le"))
 2186         else if (Name.startswith("gt"))
 2188         else if (Name.startswith("ge"))
 2190         else if (Name.startswith("eq"))
 2192         else if (Name.startswith("ne"))
 2194         else if (Name.startswith("false"))
 2196         else if (Name.startswith("true"))
 2203     } else if (IsX86 && Name.startswith("xop.vpcmov")) {
 2209     } else if (IsX86 && (Name.startswith("xop.vprot") ||
 2210                          Name.startswith("avx512.prol") ||
 2211                          Name.startswith("avx512.mask.prol"))) {
 2213     } else if (IsX86 && (Name.startswith("avx512.pror") ||
 2214                          Name.startswith("avx512.mask.pror"))) {
 2216     } else if (IsX86 && (Name.startswith("avx512.vpshld.") ||
 2217                          Name.startswith("avx512.mask.vpshld") ||
 2218                          Name.startswith("avx512.maskz.vpshld"))) {
 2219       bool ZeroMask = Name[11] == 'z';
 2221     } else if (IsX86 && (Name.startswith("avx512.vpshrd.") ||
 2222                          Name.startswith("avx512.mask.vpshrd") ||
 2223                          Name.startswith("avx512.maskz.vpshrd"))) {
 2224       bool ZeroMask = Name[11] == 'z';
 2226     } else if (IsX86 && Name == "sse42.crc32.64.8") {
 2232     } else if (IsX86 && (Name.startswith("avx.vbroadcast.s") ||
 2233                          Name.startswith("avx512.vbroadcast.s"))) {
 2246     } else if (IsX86 && (Name.startswith("sse41.pmovsx") ||
 2247                          Name.startswith("sse41.pmovzx") ||
 2248                          Name.startswith("avx2.pmovsx") ||
 2249                          Name.startswith("avx2.pmovzx") ||
 2250                          Name.startswith("avx512.mask.pmovsx") ||
 2251                          Name.startswith("avx512.mask.pmovzx"))) {
 2264       bool DoSext = (StringRef::npos != Name.find("pmovsx"));
 2271     } else if (Name == "avx512.mask.pmov.qd.256" ||
 2272                Name == "avx512.mask.pmov.qd.512" ||
 2273                Name == "avx512.mask.pmov.wb.256" ||
 2274                Name == "avx512.mask.pmov.wb.512") {
 2279     } else if (IsX86 && (Name.startswith("avx.vbroadcastf128") ||
 2280                          Name == "avx2.vbroadcasti128")) {
 2294     } else if (IsX86 && (Name.startswith("avx512.mask.shuf.i") ||
 2295                          Name.startswith("avx512.mask.shuf.f"))) {
 2316     }else if (IsX86 && (Name.startswith("avx512.mask.broadcastf") ||
 2317                          Name.startswith("avx512.mask.broadcasti"))) {
 2331     } else if (IsX86 && (Name.startswith("avx2.pbroadcast") ||
 2332                          Name.startswith("avx2.vbroadcast") ||
 2333                          Name.startswith("avx512.pbroadcast") ||
 2334                          Name.startswith("avx512.mask.broadcast.s"))) {
 2345     } else if (IsX86 && (Name.startswith("sse2.padds.") ||
 2346                          Name.startswith("sse2.psubs.") ||
 2347                          Name.startswith("avx2.padds.") ||
 2348                          Name.startswith("avx2.psubs.") ||
 2349                          Name.startswith("avx512.padds.") ||
 2350                          Name.startswith("avx512.psubs.") ||
 2351                          Name.startswith("avx512.mask.padds.") ||
 2352                          Name.startswith("avx512.mask.psubs."))) {
 2353       bool IsAdd = Name.contains(".padds");
 2355     } else if (IsX86 && (Name.startswith("sse2.paddus.") ||
 2356                          Name.startswith("sse2.psubus.") ||
 2357                          Name.startswith("avx2.paddus.") ||
 2358                          Name.startswith("avx2.psubus.") ||
 2359                          Name.startswith("avx512.mask.paddus.") ||
 2360                          Name.startswith("avx512.mask.psubus."))) {
 2361       bool IsAdd = Name.contains(".paddus");
 2363     } else if (IsX86 && Name.startswith("avx512.mask.palignr.")) {
 2370     } else if (IsX86 && Name.startswith("avx512.mask.valign.")) {
 2377     } else if (IsX86 && (Name == "sse2.psll.dq" ||
 2378                          Name == "avx2.psll.dq")) {
 2383     } else if (IsX86 && (Name == "sse2.psrl.dq" ||
 2384                          Name == "avx2.psrl.dq")) {
 2389     } else if (IsX86 && (Name == "sse2.psll.dq.bs" ||
 2390                          Name == "avx2.psll.dq.bs" ||
 2391                          Name == "avx512.psll.dq.512")) {
 2395     } else if (IsX86 && (Name == "sse2.psrl.dq.bs" ||
 2396                          Name == "avx2.psrl.dq.bs" ||
 2397                          Name == "avx512.psrl.dq.512")) {
 2401     } else if (IsX86 && (Name == "sse41.pblendw" ||
 2402                          Name.startswith("sse41.blendp") ||
 2403                          Name.startswith("avx.blend.p") ||
 2404                          Name == "avx2.pblendw" ||
 2405                          Name.startswith("avx2.pblendd."))) {
 2417     } else if (IsX86 && (Name.startswith("avx.vinsertf128.") ||
 2418                          Name == "avx2.vinserti128" ||
 2419                          Name.startswith("avx512.mask.insert"))) {
 2462     } else if (IsX86 && (Name.startswith("avx.vextractf128.") ||
 2463                          Name == "avx2.vextracti128" ||
 2464                          Name.startswith("avx512.mask.vextract"))) {
 2485     } else if (!IsX86 && Name == "stackprotectorcheck") {
 2487     } else if (IsX86 && (Name.startswith("avx512.mask.perm.df.") ||
 2488                          Name.startswith("avx512.mask.perm.di."))) {
 2503     } else if (IsX86 && (Name.startswith("avx.vperm2f128.") ||
 2504                          Name == "avx2.vperm2i128")) {
 2539     } else if (IsX86 && (Name.startswith("avx.vpermil.") ||
 2540                          Name == "sse2.pshuf.d" ||
 2541                          Name.startswith("avx512.mask.vpermil.p") ||
 2542                          Name.startswith("avx512.mask.pshuf.d."))) {
 2563     } else if (IsX86 && (Name == "sse2.pshufl.w" ||
 2564                          Name.startswith("avx512.mask.pshufl.w."))) {
 2582     } else if (IsX86 && (Name == "sse2.pshufh.w" ||
 2583                          Name.startswith("avx512.mask.pshufh.w."))) {
 2601     } else if (IsX86 && Name.startswith("avx512.mask.shuf.p")) {
 2626     } else if (IsX86 && (Name.startswith("avx512.mask.movddup") ||
 2627                          Name.startswith("avx512.mask.movshdup") ||
 2628                          Name.startswith("avx512.mask.movsldup"))) {
 2634       if (Name.startswith("avx512.mask.movshdup."))
 2648     } else if (IsX86 && (Name.startswith("avx512.mask.punpckl") ||
 2649                          Name.startswith("avx512.mask.unpckl."))) {
 2664     } else if (IsX86 && (Name.startswith("avx512.mask.punpckh") ||
 2665                          Name.startswith("avx512.mask.unpckh."))) {
 2680     } else if (IsX86 && (Name.startswith("avx512.mask.and.") ||
 2681                          Name.startswith("avx512.mask.pand."))) {
 2689     } else if (IsX86 && (Name.startswith("avx512.mask.andn.") ||
 2690                          Name.startswith("avx512.mask.pandn."))) {
 2699     } else if (IsX86 && (Name.startswith("avx512.mask.or.") ||
 2700                          Name.startswith("avx512.mask.por."))) {
 2708     } else if (IsX86 && (Name.startswith("avx512.mask.xor.") ||
 2709                          Name.startswith("avx512.mask.pxor."))) {
 2717     } else if (IsX86 && Name.startswith("avx512.mask.padd.")) {
 2721     } else if (IsX86 && Name.startswith("avx512.mask.psub.")) {
 2725     } else if (IsX86 && Name.startswith("avx512.mask.pmull.")) {
 2729     } else if (IsX86 && Name.startswith("avx512.mask.add.p")) {
 2730       if (Name.endswith(".512")) {
 2732         if (Name[17] == 's')
 2745     } else if (IsX86 && Name.startswith("avx512.mask.div.p")) {
 2746       if (Name.endswith(".512")) {
 2748         if (Name[17] == 's')
 2761     } else if (IsX86 && Name.startswith("avx512.mask.mul.p")) {
 2762       if (Name.endswith(".512")) {
 2764         if (Name[17] == 's')
 2777     } else if (IsX86 && Name.startswith("avx512.mask.sub.p")) {
 2778       if (Name.endswith(".512")) {
 2780         if (Name[17] == 's')
 2793     } else if (IsX86 && (Name.startswith("avx512.mask.max.p") ||
 2794                          Name.startswith("avx512.mask.min.p")) &&
 2795                Name.drop_front(18) == ".512") {
 2796       bool IsDouble = Name[17] == 'd';
 2797       bool IsMin = Name[13] == 'i';
 2809     } else if (IsX86 && Name.startswith("avx512.mask.lzcnt.")) {
 2816     } else if (IsX86 && Name.startswith("avx512.mask.psll")) {
 2817       bool IsImmediate = Name[16] == 'i' ||
 2818                          (Name.size() > 18 && Name[18] == 'i');
 2818                          (Name.size() > 18 && Name[18] == 'i');
 2819       bool IsVariable = Name[16] == 'v';
 2820       char Size = Name[16] == '.' ? Name[17] :
 2820       char Size = Name[16] == '.' ? Name[17] :
 2821                   Name[17] == '.' ? Name[18] :
 2821                   Name[17] == '.' ? Name[18] :
 2822                   Name[18] == '.' ? Name[19] :
 2822                   Name[18] == '.' ? Name[19] :
 2823                                     Name[20];
 2826       if (IsVariable && Name[17] != '.') {
 2827         if (Size == 'd' && Name[17] == '2') // avx512.mask.psllv2.di
 2829         else if (Size == 'd' && Name[17] == '4') // avx512.mask.psllv4.di
 2831         else if (Size == 's' && Name[17] == '4') // avx512.mask.psllv4.si
 2833         else if (Size == 's' && Name[17] == '8') // avx512.mask.psllv8.si
 2835         else if (Size == 'h' && Name[17] == '8') // avx512.mask.psllv8.hi
 2837         else if (Size == 'h' && Name[17] == '1') // avx512.mask.psllv16.hi
 2839         else if (Name[17] == '3' && Name[18] == '2') // avx512.mask.psllv32hi
 2839         else if (Name[17] == '3' && Name[18] == '2') // avx512.mask.psllv32hi
 2843       } else if (Name.endswith(".128")) {
 2855       } else if (Name.endswith(".256")) {
 2884     } else if (IsX86 && Name.startswith("avx512.mask.psrl")) {
 2885       bool IsImmediate = Name[16] == 'i' ||
 2886                          (Name.size() > 18 && Name[18] == 'i');
 2886                          (Name.size() > 18 && Name[18] == 'i');
 2887       bool IsVariable = Name[16] == 'v';
 2888       char Size = Name[16] == '.' ? Name[17] :
 2888       char Size = Name[16] == '.' ? Name[17] :
 2889                   Name[17] == '.' ? Name[18] :
 2889                   Name[17] == '.' ? Name[18] :
 2890                   Name[18] == '.' ? Name[19] :
 2890                   Name[18] == '.' ? Name[19] :
 2891                                     Name[20];
 2894       if (IsVariable && Name[17] != '.') {
 2895         if (Size == 'd' && Name[17] == '2') // avx512.mask.psrlv2.di
 2897         else if (Size == 'd' && Name[17] == '4') // avx512.mask.psrlv4.di
 2899         else if (Size == 's' && Name[17] == '4') // avx512.mask.psrlv4.si
 2901         else if (Size == 's' && Name[17] == '8') // avx512.mask.psrlv8.si
 2903         else if (Size == 'h' && Name[17] == '8') // avx512.mask.psrlv8.hi
 2905         else if (Size == 'h' && Name[17] == '1') // avx512.mask.psrlv16.hi
 2907         else if (Name[17] == '3' && Name[18] == '2') // avx512.mask.psrlv32hi
 2907         else if (Name[17] == '3' && Name[18] == '2') // avx512.mask.psrlv32hi
 2911       } else if (Name.endswith(".128")) {
 2923       } else if (Name.endswith(".256")) {
 2952     } else if (IsX86 && Name.startswith("avx512.mask.psra")) {
 2953       bool IsImmediate = Name[16] == 'i' ||
 2954                          (Name.size() > 18 && Name[18] == 'i');
 2954                          (Name.size() > 18 && Name[18] == 'i');
 2955       bool IsVariable = Name[16] == 'v';
 2956       char Size = Name[16] == '.' ? Name[17] :
 2956       char Size = Name[16] == '.' ? Name[17] :
 2957                   Name[17] == '.' ? Name[18] :
 2957                   Name[17] == '.' ? Name[18] :
 2958                   Name[18] == '.' ? Name[19] :
 2958                   Name[18] == '.' ? Name[19] :
 2959                                     Name[20];
 2962       if (IsVariable && Name[17] != '.') {
 2963         if (Size == 's' && Name[17] == '4') // avx512.mask.psrav4.si
 2965         else if (Size == 's' && Name[17] == '8') // avx512.mask.psrav8.si
 2967         else if (Size == 'h' && Name[17] == '8') // avx512.mask.psrav8.hi
 2969         else if (Size == 'h' && Name[17] == '1') // avx512.mask.psrav16.hi
 2971         else if (Name[17] == '3' && Name[18] == '2') // avx512.mask.psrav32hi
 2971         else if (Name[17] == '3' && Name[18] == '2') // avx512.mask.psrav32hi
 2975       } else if (Name.endswith(".128")) {
 2988       } else if (Name.endswith(".256")) {
 3018     } else if (IsX86 && Name.startswith("avx512.mask.move.s")) {
 3020     } else if (IsX86 && Name.startswith("avx512.cvtmask2")) {
 3022     } else if (IsX86 && Name.endswith(".movntdqa")) {
 3036     } else if (IsX86 && (Name.startswith("fma.vfmadd.") ||
 3037                          Name.startswith("fma.vfmsub.") ||
 3038                          Name.startswith("fma.vfnmadd.") ||
 3039                          Name.startswith("fma.vfnmsub."))) {
 3040       bool NegMul = Name[6] == 'n';
 3041       bool NegAcc = NegMul ? Name[8] == 's' : Name[7] == 's';
 3041       bool NegAcc = NegMul ? Name[8] == 's' : Name[7] == 's';
 3042       bool IsScalar = NegMul ? Name[12] == 's' : Name[11] == 's';
 3042       bool IsScalar = NegMul ? Name[12] == 's' : Name[11] == 's';
 3068     } else if (IsX86 && Name.startswith("fma4.vfmadd.s")) {
 3083     } else if (IsX86 && (Name.startswith("avx512.mask.vfmadd.s") ||
 3084                          Name.startswith("avx512.maskz.vfmadd.s") ||
 3085                          Name.startswith("avx512.mask3.vfmadd.s") ||
 3086                          Name.startswith("avx512.mask3.vfmsub.s") ||
 3087                          Name.startswith("avx512.mask3.vfnmsub.s"))) {
 3088       bool IsMask3 = Name[11] == '3';
 3089       bool IsMaskZ = Name[11] == 'z';
 3091       Name = Name.drop_front(IsMask3 || IsMaskZ ? 13 : 12);
 3091       Name = Name.drop_front(IsMask3 || IsMaskZ ? 13 : 12);
 3092       bool NegMul = Name[2] == 'n';
 3093       bool NegAcc = NegMul ? Name[4] == 's' : Name[3] == 's';
 3093       bool NegAcc = NegMul ? Name[4] == 's' : Name[3] == 's';
 3115         if (Name.back() == 'd')
 3141     } else if (IsX86 && (Name.startswith("avx512.mask.vfmadd.p") ||
 3142                          Name.startswith("avx512.mask.vfnmadd.p") ||
 3143                          Name.startswith("avx512.mask.vfnmsub.p") ||
 3144                          Name.startswith("avx512.mask3.vfmadd.p") ||
 3145                          Name.startswith("avx512.mask3.vfmsub.p") ||
 3146                          Name.startswith("avx512.mask3.vfnmsub.p") ||
 3147                          Name.startswith("avx512.maskz.vfmadd.p"))) {
 3148       bool IsMask3 = Name[11] == '3';
 3149       bool IsMaskZ = Name[11] == 'z';
 3151       Name = Name.drop_front(IsMask3 || IsMaskZ ? 13 : 12);
 3151       Name = Name.drop_front(IsMask3 || IsMaskZ ? 13 : 12);
 3152       bool NegMul = Name[2] == 'n';
 3153       bool NegAcc = NegMul ? Name[4] == 's' : Name[3] == 's';
 3153       bool NegAcc = NegMul ? Name[4] == 's' : Name[3] == 's';
 3171         if (Name[Name.size()-5] == 's')
 3171         if (Name[Name.size()-5] == 's')
 3190     } else if (IsX86 && (Name.startswith("fma.vfmaddsub.p") ||
 3191                          Name.startswith("fma.vfmsubadd.p"))) {
 3192       bool IsSubAdd = Name[7] == 's';
 3212     } else if (IsX86 && (Name.startswith("avx512.mask.vfmaddsub.p") ||
 3213                          Name.startswith("avx512.mask3.vfmaddsub.p") ||
 3214                          Name.startswith("avx512.maskz.vfmaddsub.p") ||
 3215                          Name.startswith("avx512.mask3.vfmsubadd.p"))) {
 3216       bool IsMask3 = Name[11] == '3';
 3217       bool IsMaskZ = Name[11] == 'z';
 3219       Name = Name.drop_front(IsMask3 || IsMaskZ ? 13 : 12);
 3219       Name = Name.drop_front(IsMask3 || IsMaskZ ? 13 : 12);
 3220       bool IsSubAdd = Name[3] == 's';
 3226         if (Name[Name.size()-5] == 's')
 3226         if (Name[Name.size()-5] == 's')
 3266     } else if (IsX86 && (Name.startswith("avx512.mask.pternlog.") ||
 3267                          Name.startswith("avx512.maskz.pternlog."))) {
 3268       bool ZeroMask = Name[11] == 'z';
 3294     } else if (IsX86 && (Name.startswith("avx512.mask.vpmadd52") ||
 3295                          Name.startswith("avx512.maskz.vpmadd52"))) {
 3296       bool ZeroMask = Name[11] == 'z';
 3297       bool High = Name[20] == 'h' || Name[21] == 'h';
 3297       bool High = Name[20] == 'h' || Name[21] == 'h';
 3322     } else if (IsX86 && (Name.startswith("avx512.mask.vpermi2var.") ||
 3323                          Name.startswith("avx512.mask.vpermt2var.") ||
 3324                          Name.startswith("avx512.maskz.vpermt2var."))) {
 3325       bool ZeroMask = Name[11] == 'z';
 3326       bool IndexForm = Name[17] == 'i';
 3328     } else if (IsX86 && (Name.startswith("avx512.mask.vpdpbusd.") ||
 3329                          Name.startswith("avx512.maskz.vpdpbusd.") ||
 3330                          Name.startswith("avx512.mask.vpdpbusds.") ||
 3331                          Name.startswith("avx512.maskz.vpdpbusds."))) {
 3332       bool ZeroMask = Name[11] == 'z';
 3333       bool IsSaturating = Name[ZeroMask ? 21 : 20] == 's';
 3358     } else if (IsX86 && (Name.startswith("avx512.mask.vpdpwssd.") ||
 3359                          Name.startswith("avx512.maskz.vpdpwssd.") ||
 3360                          Name.startswith("avx512.mask.vpdpwssds.") ||
 3361                          Name.startswith("avx512.maskz.vpdpwssds."))) {
 3362       bool ZeroMask = Name[11] == 'z';
 3363       bool IsSaturating = Name[ZeroMask ? 21 : 20] == 's';
 3388     } else if (IsX86 && (Name == "addcarryx.u32" || Name == "addcarryx.u64" ||
 3388     } else if (IsX86 && (Name == "addcarryx.u32" || Name == "addcarryx.u64" ||
 3389                          Name == "addcarry.u32" || Name == "addcarry.u64" ||
 3389                          Name == "addcarry.u32" || Name == "addcarry.u64" ||
 3390                          Name == "subborrow.u32" || Name == "subborrow.u64")) {
 3390                          Name == "subborrow.u32" || Name == "subborrow.u64")) {
 3392       if (Name[0] == 'a' && Name.back() == '2')
 3392       if (Name[0] == 'a' && Name.back() == '2')
 3394       else if (Name[0] == 'a' && Name.back() == '4')
 3394       else if (Name[0] == 'a' && Name.back() == '4')
 3396       else if (Name[0] == 's' && Name.back() == '2')
 3396       else if (Name[0] == 's' && Name.back() == '2')
 3398       else if (Name[0] == 's' && Name.back() == '4')
 3398       else if (Name[0] == 's' && Name.back() == '4')
 3421     } else if (IsX86 && Name.startswith("avx512.mask.") &&
 3422                upgradeAVX512MaskToSelect(Name, Builder, *CI, Rep)) {
 3424     } else if (IsNVVM && (Name == "abs.i" || Name == "abs.ll")) {
 3424     } else if (IsNVVM && (Name == "abs.i" || Name == "abs.ll")) {
 3430     } else if (IsNVVM && (Name.startswith("atomic.load.add.f32.p") ||
 3431                           Name.startswith("atomic.load.add.f64.p"))) {
 3436     } else if (IsNVVM && (Name == "max.i" || Name == "max.ll" ||
 3436     } else if (IsNVVM && (Name == "max.i" || Name == "max.ll" ||
 3437                           Name == "max.ui" || Name == "max.ull")) {
 3437                           Name == "max.ui" || Name == "max.ull")) {
 3440       Value *Cmp = Name.endswith(".ui") || Name.endswith(".ull")
 3440       Value *Cmp = Name.endswith(".ui") || Name.endswith(".ull")
 3444     } else if (IsNVVM && (Name == "min.i" || Name == "min.ll" ||
 3444     } else if (IsNVVM && (Name == "min.i" || Name == "min.ll" ||
 3445                           Name == "min.ui" || Name == "min.ull")) {
 3445                           Name == "min.ui" || Name == "min.ull")) {
 3448       Value *Cmp = Name.endswith(".ui") || Name.endswith(".ull")
 3448       Value *Cmp = Name.endswith(".ui") || Name.endswith(".ull")
 3452     } else if (IsNVVM && Name == "clz.ll") {
 3460     } else if (IsNVVM && Name == "popc.ll") {
 3469     } else if (IsNVVM && Name == "h2f") {