-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[llvm][NFC] Autoupdater x86 detection #72808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The x86 intrinsic detector has grown over time by (mostly) appending new entries. However, sorting the entries in colation order makes it easier to see which intrinsics are affected -- and as each has a note about when it was added, no information is lost. But more than that, it permits common prefix consumption, reducing the number of tests that are performed. We replace 324 string compares with 14 prefix tests (and subsequent compares if one of those hits).
@llvm/pr-subscribers-llvm-ir Author: Nathan Sidwell (urnathan) ChangesThe x86 intrinsic detector has grown over time by (mostly) appending new entries. However, sorting the entries in colation order makes it easier to see which intrinsics are affected -- and as each has a note about when it was added, no information is lost. But more than that, it permits common prefix consumption, reducing the number of tests that are performed. We replace 324 string compares with 14 prefix tests (and subsequent compares if one of those hits). Patch is 41.57 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/72808.diff 1 Files Affected:
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index f401135127c1b2b..62df9de2ecc16de 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -122,333 +122,363 @@ static bool ShouldUpgradeX86Intrinsic(Function *F, StringRef Name) {
// like to use this information to remove upgrade code for some older
// intrinsics. It is currently undecided how we will determine that future
// point.
- if (Name == "addcarryx.u32" || // Added in 8.0
- Name == "addcarryx.u64" || // Added in 8.0
- Name == "addcarry.u32" || // Added in 8.0
- Name == "addcarry.u64" || // Added in 8.0
- Name == "subborrow.u32" || // Added in 8.0
- Name == "subborrow.u64" || // Added in 8.0
- Name.starts_with("sse2.padds.") || // Added in 8.0
- Name.starts_with("sse2.psubs.") || // Added in 8.0
- Name.starts_with("sse2.paddus.") || // Added in 8.0
- Name.starts_with("sse2.psubus.") || // Added in 8.0
- Name.starts_with("avx2.padds.") || // Added in 8.0
- Name.starts_with("avx2.psubs.") || // Added in 8.0
- Name.starts_with("avx2.paddus.") || // Added in 8.0
- Name.starts_with("avx2.psubus.") || // Added in 8.0
- Name.starts_with("avx512.padds.") || // Added in 8.0
- Name.starts_with("avx512.psubs.") || // Added in 8.0
- Name.starts_with("avx512.mask.padds.") || // Added in 8.0
- Name.starts_with("avx512.mask.psubs.") || // Added in 8.0
- Name.starts_with("avx512.mask.paddus.") || // Added in 8.0
- Name.starts_with("avx512.mask.psubus.") || // Added in 8.0
- Name=="ssse3.pabs.b.128" || // Added in 6.0
- Name=="ssse3.pabs.w.128" || // Added in 6.0
- Name=="ssse3.pabs.d.128" || // Added in 6.0
- Name.starts_with("fma4.vfmadd.s") || // Added in 7.0
- Name.starts_with("fma.vfmadd.") || // Added in 7.0
- Name.starts_with("fma.vfmsub.") || // Added in 7.0
- Name.starts_with("fma.vfmsubadd.") || // Added in 7.0
- Name.starts_with("fma.vfnmadd.") || // Added in 7.0
- Name.starts_with("fma.vfnmsub.") || // Added in 7.0
- Name.starts_with("avx512.mask.vfmadd.") || // Added in 7.0
- Name.starts_with("avx512.mask.vfnmadd.") || // Added in 7.0
- Name.starts_with("avx512.mask.vfnmsub.") || // Added in 7.0
- Name.starts_with("avx512.mask3.vfmadd.") || // Added in 7.0
- Name.starts_with("avx512.maskz.vfmadd.") || // Added in 7.0
- Name.starts_with("avx512.mask3.vfmsub.") || // Added in 7.0
- Name.starts_with("avx512.mask3.vfnmsub.") || // Added in 7.0
- Name.starts_with("avx512.mask.vfmaddsub.") || // Added in 7.0
- Name.starts_with("avx512.maskz.vfmaddsub.") || // Added in 7.0
- Name.starts_with("avx512.mask3.vfmaddsub.") || // Added in 7.0
- Name.starts_with("avx512.mask3.vfmsubadd.") || // Added in 7.0
- Name.starts_with("avx512.mask.shuf.i") || // Added in 6.0
- Name.starts_with("avx512.mask.shuf.f") || // Added in 6.0
- Name.starts_with("avx512.kunpck") || //added in 6.0
- Name.starts_with("avx2.pabs.") || // Added in 6.0
- Name.starts_with("avx512.mask.pabs.") || // Added in 6.0
- Name.starts_with("avx512.broadcastm") || // Added in 6.0
- Name == "sse.sqrt.ss" || // Added in 7.0
- Name == "sse2.sqrt.sd" || // Added in 7.0
- Name.starts_with("avx512.mask.sqrt.p") || // Added in 7.0
- Name.starts_with("avx.sqrt.p") || // Added in 7.0
- Name.starts_with("sse2.sqrt.p") || // Added in 7.0
- Name.starts_with("sse.sqrt.p") || // Added in 7.0
- Name.starts_with("avx512.mask.pbroadcast") || // Added in 6.0
- Name.starts_with("sse2.pcmpeq.") || // Added in 3.1
- Name.starts_with("sse2.pcmpgt.") || // Added in 3.1
- Name.starts_with("avx2.pcmpeq.") || // Added in 3.1
- Name.starts_with("avx2.pcmpgt.") || // Added in 3.1
- Name.starts_with("avx512.mask.pcmpeq.") || // Added in 3.9
- Name.starts_with("avx512.mask.pcmpgt.") || // Added in 3.9
- Name.starts_with("avx.vperm2f128.") || // Added in 6.0
- Name == "avx2.vperm2i128" || // Added in 6.0
- Name == "sse.add.ss" || // Added in 4.0
- Name == "sse2.add.sd" || // Added in 4.0
- Name == "sse.sub.ss" || // Added in 4.0
- Name == "sse2.sub.sd" || // Added in 4.0
- Name == "sse.mul.ss" || // Added in 4.0
- Name == "sse2.mul.sd" || // Added in 4.0
- Name == "sse.div.ss" || // Added in 4.0
- Name == "sse2.div.sd" || // Added in 4.0
- Name == "sse41.pmaxsb" || // Added in 3.9
- Name == "sse2.pmaxs.w" || // Added in 3.9
- Name == "sse41.pmaxsd" || // Added in 3.9
- Name == "sse2.pmaxu.b" || // Added in 3.9
- Name == "sse41.pmaxuw" || // Added in 3.9
- Name == "sse41.pmaxud" || // Added in 3.9
- Name == "sse41.pminsb" || // Added in 3.9
- Name == "sse2.pmins.w" || // Added in 3.9
- Name == "sse41.pminsd" || // Added in 3.9
- Name == "sse2.pminu.b" || // Added in 3.9
- Name == "sse41.pminuw" || // Added in 3.9
- Name == "sse41.pminud" || // Added in 3.9
- Name == "avx512.kand.w" || // Added in 7.0
- Name == "avx512.kandn.w" || // Added in 7.0
- Name == "avx512.knot.w" || // Added in 7.0
- Name == "avx512.kor.w" || // Added in 7.0
- Name == "avx512.kxor.w" || // Added in 7.0
- Name == "avx512.kxnor.w" || // Added in 7.0
- Name == "avx512.kortestc.w" || // Added in 7.0
- Name == "avx512.kortestz.w" || // Added in 7.0
- Name.starts_with("avx512.mask.pshuf.b.") || // Added in 4.0
- Name.starts_with("avx2.pmax") || // Added in 3.9
- Name.starts_with("avx2.pmin") || // Added in 3.9
- Name.starts_with("avx512.mask.pmax") || // Added in 4.0
- Name.starts_with("avx512.mask.pmin") || // Added in 4.0
- Name.starts_with("avx2.vbroadcast") || // Added in 3.8
- Name.starts_with("avx2.pbroadcast") || // Added in 3.8
- Name.starts_with("avx.vpermil.") || // Added in 3.1
- Name.starts_with("sse2.pshuf") || // Added in 3.9
- Name.starts_with("avx512.pbroadcast") || // Added in 3.9
- Name.starts_with("avx512.mask.broadcast.s") || // Added in 3.9
- Name.starts_with("avx512.mask.movddup") || // Added in 3.9
- Name.starts_with("avx512.mask.movshdup") || // Added in 3.9
- Name.starts_with("avx512.mask.movsldup") || // Added in 3.9
- Name.starts_with("avx512.mask.pshuf.d.") || // Added in 3.9
- Name.starts_with("avx512.mask.pshufl.w.") || // Added in 3.9
- Name.starts_with("avx512.mask.pshufh.w.") || // Added in 3.9
- Name.starts_with("avx512.mask.shuf.p") || // Added in 4.0
- Name.starts_with("avx512.mask.vpermil.p") || // Added in 3.9
- Name.starts_with("avx512.mask.perm.df.") || // Added in 3.9
- Name.starts_with("avx512.mask.perm.di.") || // Added in 3.9
- Name.starts_with("avx512.mask.punpckl") || // Added in 3.9
- Name.starts_with("avx512.mask.punpckh") || // Added in 3.9
- Name.starts_with("avx512.mask.unpckl.") || // Added in 3.9
- Name.starts_with("avx512.mask.unpckh.") || // Added in 3.9
- Name.starts_with("avx512.mask.pand.") || // Added in 3.9
- Name.starts_with("avx512.mask.pandn.") || // Added in 3.9
- Name.starts_with("avx512.mask.por.") || // Added in 3.9
- Name.starts_with("avx512.mask.pxor.") || // Added in 3.9
- Name.starts_with("avx512.mask.and.") || // Added in 3.9
- Name.starts_with("avx512.mask.andn.") || // Added in 3.9
- Name.starts_with("avx512.mask.or.") || // Added in 3.9
- Name.starts_with("avx512.mask.xor.") || // Added in 3.9
- Name.starts_with("avx512.mask.padd.") || // Added in 4.0
- Name.starts_with("avx512.mask.psub.") || // Added in 4.0
- Name.starts_with("avx512.mask.pmull.") || // Added in 4.0
- Name.starts_with("avx512.mask.cvtdq2pd.") || // Added in 4.0
- Name.starts_with("avx512.mask.cvtudq2pd.") || // Added in 4.0
- Name.starts_with("avx512.mask.cvtudq2ps.") || // Added in 7.0 updated 9.0
- Name.starts_with("avx512.mask.cvtqq2pd.") || // Added in 7.0 updated 9.0
- Name.starts_with("avx512.mask.cvtuqq2pd.") || // Added in 7.0 updated 9.0
- Name.starts_with("avx512.mask.cvtdq2ps.") || // Added in 7.0 updated 9.0
- Name == "avx512.mask.vcvtph2ps.128" || // Added in 11.0
- Name == "avx512.mask.vcvtph2ps.256" || // Added in 11.0
- Name == "avx512.mask.cvtqq2ps.256" || // Added in 9.0
- Name == "avx512.mask.cvtqq2ps.512" || // Added in 9.0
- Name == "avx512.mask.cvtuqq2ps.256" || // Added in 9.0
- Name == "avx512.mask.cvtuqq2ps.512" || // Added in 9.0
- Name == "avx512.mask.cvtpd2dq.256" || // Added in 7.0
- Name == "avx512.mask.cvtpd2ps.256" || // Added in 7.0
- Name == "avx512.mask.cvttpd2dq.256" || // Added in 7.0
- Name == "avx512.mask.cvttps2dq.128" || // Added in 7.0
- Name == "avx512.mask.cvttps2dq.256" || // Added in 7.0
- Name == "avx512.mask.cvtps2pd.128" || // Added in 7.0
- Name == "avx512.mask.cvtps2pd.256" || // Added in 7.0
- Name == "avx512.cvtusi2sd" || // Added in 7.0
- Name.starts_with("avx512.mask.permvar.") || // Added in 7.0
- Name == "sse2.pmulu.dq" || // Added in 7.0
- Name == "sse41.pmuldq" || // Added in 7.0
- Name == "avx2.pmulu.dq" || // Added in 7.0
- Name == "avx2.pmul.dq" || // Added in 7.0
- Name == "avx512.pmulu.dq.512" || // Added in 7.0
- Name == "avx512.pmul.dq.512" || // Added in 7.0
- Name.starts_with("avx512.mask.pmul.dq.") || // Added in 4.0
- Name.starts_with("avx512.mask.pmulu.dq.") || // Added in 4.0
- Name.starts_with("avx512.mask.pmul.hr.sw.") || // Added in 7.0
- Name.starts_with("avx512.mask.pmulh.w.") || // Added in 7.0
- Name.starts_with("avx512.mask.pmulhu.w.") || // Added in 7.0
- Name.starts_with("avx512.mask.pmaddw.d.") || // Added in 7.0
- Name.starts_with("avx512.mask.pmaddubs.w.") || // Added in 7.0
- Name.starts_with("avx512.mask.packsswb.") || // Added in 5.0
- Name.starts_with("avx512.mask.packssdw.") || // Added in 5.0
- Name.starts_with("avx512.mask.packuswb.") || // Added in 5.0
- Name.starts_with("avx512.mask.packusdw.") || // Added in 5.0
- Name.starts_with("avx512.mask.cmp.b") || // Added in 5.0
- Name.starts_with("avx512.mask.cmp.d") || // Added in 5.0
- Name.starts_with("avx512.mask.cmp.q") || // Added in 5.0
- Name.starts_with("avx512.mask.cmp.w") || // Added in 5.0
- Name.starts_with("avx512.cmp.p") || // Added in 12.0
- Name.starts_with("avx512.mask.ucmp.") || // Added in 5.0
- Name.starts_with("avx512.cvtb2mask.") || // Added in 7.0
- Name.starts_with("avx512.cvtw2mask.") || // Added in 7.0
- Name.starts_with("avx512.cvtd2mask.") || // Added in 7.0
- Name.starts_with("avx512.cvtq2mask.") || // Added in 7.0
- Name.starts_with("avx512.mask.vpermilvar.") || // Added in 4.0
- Name.starts_with("avx512.mask.psll.d") || // Added in 4.0
- Name.starts_with("avx512.mask.psll.q") || // Added in 4.0
- Name.starts_with("avx512.mask.psll.w") || // Added in 4.0
- Name.starts_with("avx512.mask.psra.d") || // Added in 4.0
- Name.starts_with("avx512.mask.psra.q") || // Added in 4.0
- Name.starts_with("avx512.mask.psra.w") || // Added in 4.0
- Name.starts_with("avx512.mask.psrl.d") || // Added in 4.0
- Name.starts_with("avx512.mask.psrl.q") || // Added in 4.0
- Name.starts_with("avx512.mask.psrl.w") || // Added in 4.0
- Name.starts_with("avx512.mask.pslli") || // Added in 4.0
- Name.starts_with("avx512.mask.psrai") || // Added in 4.0
- Name.starts_with("avx512.mask.psrli") || // Added in 4.0
- Name.starts_with("avx512.mask.psllv") || // Added in 4.0
- Name.starts_with("avx512.mask.psrav") || // Added in 4.0
- Name.starts_with("avx512.mask.psrlv") || // Added in 4.0
- Name.starts_with("sse41.pmovsx") || // Added in 3.8
- Name.starts_with("sse41.pmovzx") || // Added in 3.9
- Name.starts_with("avx2.pmovsx") || // Added in 3.9
- Name.starts_with("avx2.pmovzx") || // Added in 3.9
- Name.starts_with("avx512.mask.pmovsx") || // Added in 4.0
- Name.starts_with("avx512.mask.pmovzx") || // Added in 4.0
- Name.starts_with("avx512.mask.lzcnt.") || // Added in 5.0
- Name.starts_with("avx512.mask.pternlog.") || // Added in 7.0
- Name.starts_with("avx512.maskz.pternlog.") || // Added in 7.0
- Name.starts_with("avx512.mask.vpmadd52") || // Added in 7.0
- Name.starts_with("avx512.maskz.vpmadd52") || // Added in 7.0
- Name.starts_with("avx512.mask.vpermi2var.") || // Added in 7.0
- Name.starts_with("avx512.mask.vpermt2var.") || // Added in 7.0
- Name.starts_with("avx512.maskz.vpermt2var.") || // Added in 7.0
- Name.starts_with("avx512.mask.vpdpbusd.") || // Added in 7.0
- Name.starts_with("avx512.maskz.vpdpbusd.") || // Added in 7.0
- Name.starts_with("avx512.mask.vpdpbusds.") || // Added in 7.0
- Name.starts_with("avx512.maskz.vpdpbusds.") || // Added in 7.0
- Name.starts_with("avx512.mask.vpdpwssd.") || // Added in 7.0
- Name.starts_with("avx512.maskz.vpdpwssd.") || // Added in 7.0
- Name.starts_with("avx512.mask.vpdpwssds.") || // Added in 7.0
- Name.starts_with("avx512.maskz.vpdpwssds.") || // Added in 7.0
- Name.starts_with("avx512.mask.dbpsadbw.") || // Added in 7.0
- Name.starts_with("avx512.mask.vpshld.") || // Added in 7.0
- Name.starts_with("avx512.mask.vpshrd.") || // Added in 7.0
- Name.starts_with("avx512.mask.vpshldv.") || // Added in 8.0
- Name.starts_with("avx512.mask.vpshrdv.") || // Added in 8.0
- Name.starts_with("avx512.maskz.vpshldv.") || // Added in 8.0
- Name.starts_with("avx512.maskz.vpshrdv.") || // Added in 8.0
- Name.starts_with("avx512.vpshld.") || // Added in 8.0
- Name.starts_with("avx512.vpshrd.") || // Added in 8.0
- Name.starts_with("avx512.mask.add.p") || // Added in 7.0. 128/256 in 4.0
- Name.starts_with("avx512.mask.sub.p") || // Added in 7.0. 128/256 in 4.0
- Name.starts_with("avx512.mask.mul.p") || // Added in 7.0. 128/256 in 4.0
- Name.starts_with("avx512.mask.div.p") || // Added in 7.0. 128/256 in 4.0
- Name.starts_with("avx512.mask.max.p") || // Added in 7.0. 128/256 in 5.0
- Name.starts_with("avx512.mask.min.p") || // Added in 7.0. 128/256 in 5.0
- Name.starts_with("avx512.mask.fpclass.p") || // Added in 7.0
- Name.starts_with("avx512.mask.vpshufbitqmb.") || // Added in 8.0
- Name.starts_with("avx512.mask.pmultishift.qb.") || // Added in 8.0
- Name.starts_with("avx512.mask.conflict.") || // Added in 9.0
- Name == "avx512.mask.pmov.qd.256" || // Added in 9.0
- Name == "avx512.mask.pmov.qd.512" || // Added in 9.0
- Name == "avx512.mask.pmov.wb.256" || // Added in 9.0
- Name == "avx512.mask.pmov.wb.512" || // Added in 9.0
- Name == "sse.cvtsi2ss" || // Added in 7.0
- Name == "sse.cvtsi642ss" || // Added in 7.0
- Name == "sse2.cvtsi2sd" || // Added in 7.0
- Name == "sse2.cvtsi642sd" || // Added in 7.0
- Name == "sse2.cvtss2sd" || // Added in 7.0
- Name == "sse2.cvtdq2pd" || // Added in 3.9
- Name == "sse2.cvtdq2ps" || // Added in 7.0
- Name == "sse2.cvtps2pd" || // Added in 3.9
- Name == "avx.cvtdq2.pd.256" || // Added in 3.9
- Name == "avx.cvtdq2.ps.256" || // Added in 7.0
- Name == "avx.cvt.ps2.pd.256" || // Added in 3.9
- Name.starts_with("vcvtph2ps.") || // Added in 11.0
- Name.starts_with("avx.vinsertf128.") || // Added in 3.7
- Name == "avx2.vinserti128" || // Added in 3.7
- Name.starts_with("avx512.mask.insert") || // Added in 4.0
- Name.starts_with("avx.vextractf128.") || // Added in 3.7
- Name == "avx2.vextracti128" || // Added in 3.7
- Name.starts_with("avx512.mask.vextract") || // Added in 4.0
- Name.starts_with("sse4a.movnt.") || // Added in 3.9
- Name.starts_with("avx.movnt.") || // Added in 3.2
- Name.starts_with("avx512.storent.") || // Added in 3.9
- Name == "sse41.movntdqa" || // Added in 5.0
- Name == "avx2.movntdqa" || // Added in 5.0
- Name == "avx512.movntdqa" || // Added in 5.0
- Name == "sse2.storel.dq" || // Added in 3.9
- Name.starts_with("sse.storeu.") || // Added in 3.9
- Name.starts_with("sse2.storeu.") || // Added in 3.9
- Name.starts_with("avx.storeu.") || // Added in 3.9
- Name.starts_with("avx512.mask.storeu.") || // Added in 3.9
- Name.starts_with("avx512.mask.store.p") || // Added in 3.9
- Name.starts_with("avx512.mask.store.b.") || // Added in 3.9
- Name.starts_with("avx512.mask.store.w.") || // Added in 3.9
- Name.starts_with("avx512.mask.store.d.") || // Added in 3.9
- Name.starts_with("avx512.mask.store.q.") || // Added in 3.9
- Name == "avx512.mask.store.ss" || // Added in 7.0
- Name.starts_with("avx512.mask.loadu.") || // Added in 3.9
- Name.starts_with("avx512.mask.load.") || // Added in 3.9
- Name.starts_with("avx512.mask.expand.load.") || // Added in 7.0
- Name.starts_with("avx512.mask.compress.store.") || // Added in 7.0
- Name.starts_with("avx512.mask.expand.b") || // Added in 9.0
- Name.starts_with("avx512.mask.expand.w") || // Added in 9.0
- Name.starts_with("avx512.mask.expand.d") || // Added in 9.0
- Name.starts_with("avx512.mask.expand.q") || // Added in 9.0
- Name.starts_with("avx512.mask.expand.p") || // Added in 9.0
- Name.starts_with("avx512.mask.compress.b") || // Added in 9.0
- Name.starts_with("avx512.mask.compress.w") || // Added in 9.0
- Name.starts_with("avx512.mask.compress.d") || // Added in 9.0
- Name.starts_with("avx512.mask.compress.q") || // Added in 9.0
- Name.starts_with("avx512.mask.compress.p") || // Added in 9.0
- Name == "sse42.crc32.64.8" || // Added in 3.4
- Name.starts_with("avx.vbroadcast.s") || // Added in 3.5
- Name.starts_with("avx512.vbroadcast.s") || // Added in 7.0
- Name.starts_with("avx512.mask.palignr.") || // Added in 3.9
- Name.starts_with("avx512.mask.valign.") || // Added in 4.0
- Name.starts_with("sse2.psll.dq") || // Added in 3.7
- Name.starts_with("sse2.psrl.dq") || // Added in 3.7
- Name.starts_with("avx2.psll.dq") || // Added in 3.7
- Name.starts_with("avx2.psrl.dq") || // Added in 3.7
- Name.starts_with("avx512.psll.dq") || // Added in 3.9
- Name.starts_with("avx512.psrl.dq") || // Added in 3.9
- Name == "sse41.pblendw" || // Added in 3.7
- Name.starts_with("sse41.blendp") || // Added in 3.7
- Name.starts_with("avx.blend.p") || // Added in 3.7
- Name == "avx2.pblendw" || // Added in 3.7
- Name.starts_with("avx2.pblendd.") || // Added in 3.7
- Name.starts_with("avx.vbroadcastf128") || // Added in 4.0
- Name == "avx2.vbroadcasti128" || // Added in 3.7
- Name.starts_with("avx512.mask.broadcastf32x4.") || // Added in 6.0
- Name.starts_with("avx512.mask.broadcastf64x2.") || // Added in 6.0
- Name.starts_with("avx512.mask.broadcastf32x8.") || // Added in 6.0
- Name.starts_with("avx512.mask.broadcastf64x4.") || // Added in 6.0
- Name.starts_with("avx512.mask.broadcasti32x4.") || // Added in 6.0
- Name.starts_with("avx512.mask.broadcasti64x2.") || // Added in 6.0
- Name.starts_with("avx512.mask.broadcasti32x8.") || // Added in 6.0
- Name.starts_with("avx512.mask.broadcasti64x4.") || // Added in 6.0
- Name == "xop.vpcmov" || // Added in 3.8
- Name == "xop.vpcmov.256" || // Added in 5.0
- Name.starts_with("avx512.mask.move.s") || // Added in 4.0
- Name.starts_with("avx512.cvtmask2") || // Added in 5.0
- Name.starts_with("xop.vpcom") || // Added in 3.2, Updated in 9.0
- Name.starts_with("xop.vprot") || // Added in 8.0
- Name.starts_with("avx512.prol") || // Added in 8.0
- Name.starts_with("avx512.pror") || // Added in 8.0
- Name.starts_with("avx512.mask.prorv.") || // Added in 8.0
- Name.starts_with("avx512.mask.pror.") || // Added in 8.0
- Name.starts_with("avx512.mask.prolv.") || // Added in 8.0
- Name.starts_with("avx512.mask.prol.") || // Added in 8.0
- Name.starts_with("avx512.ptestm") || //Added in 6.0
- Name.starts_with("avx512.ptestnm") || //Added in 6.0
- Name.starts_with("avx512.mask.pavg"))...
[truncated]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though I didn't try to verify that nothing got lost in the transition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one minor query
llvm/lib/IR/AutoUpgrade.cpp
Outdated
Name == "xop.vpcmov" || // Added in 3.8 | ||
Name == "xop.vpcmov.256" || // Added in 5.0 | ||
Name.starts_with("xop.vpcom") || // Added in 3.2, Updated in 9.0 | ||
Name.starts_with("xop.vprot")); // Added in 8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not worth pulling out the "xop." prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I was equivocating on that one. Here's an update that pulls it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - cheers
The x86 intrinsic detector has grown over time by (mostly) appending new entries. However, sorting the entries in colation order makes it easier to see which intrinsics are affected -- and as each has a note about when it was added, no information is lost. But more than that, it permits common prefix consumption, reducing the number of tests that are performed. We replace 324 string compares with 14 prefix tests (and subsequent compares if one of those hits).