Autogenerate most AArch64 platform intrinsics.

This commit is contained in:
Huon Wilson 2015-08-28 16:49:01 -07:00
parent 73811917f4
commit 3ef610b627
2 changed files with 3347 additions and 38 deletions

View File

@ -0,0 +1,550 @@
{
"platform": "aarch64",
"intrinsic_prefix": "aarch64_v",
"llvm_prefix": "llvm.aarch64.neon.",
"number_info": {
"signed": {
"kind": "s",
"data_type": { "pattern": "s{bitwidth}" }
},
"unsigned": {
"kind": "u",
"data_type": { "pattern": "u{bitwidth}" }
},
"float": {
"kind": "f",
"data_type": { "pattern": "f{bitwidth}" }
}
},
"widths": {
"64": "",
"128": "q"
},
"intrinsics": [
{
"intrinsic": "hadd{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}hadd.{0.llvm_name}",
"ret": "i(8-32)",
"args": ["0", "0"]
},
{
"intrinsic": "rhadd{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}rhadd.{0.llvm_name}",
"ret": "i(8-32)",
"args": ["0", "0"]
},
{
"intrinsic": "qadd{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}qadd.{0.llvm_name}",
"ret": "i(8-64)",
"args": ["0", "0"]
},
{
"intrinsic": "uqadd_{0.data_type}",
"width": [128],
"llvm": "suqadd.{0.llvm_name}",
"ret": "s(8-64)",
"args": ["0", "0u"]
},
{
"intrinsic": "sqadd_{0.data_type}",
"width": [128],
"llvm": "usqadd.{0.llvm_name}",
"ret": "u(8-64)",
"args": ["0", "0s"]
},
{
"intrinsic": "raddhn_{1.data_type}",
"width": [64],
"llvm": "raddhn.{0.llvm_name}",
"ret": "i(8-32)",
"args": ["0w", "0w"]
},
{
"intrinsic": "fmulx{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "fmulx.{0.llvm_name}",
"ret": "f(32-64)",
"args": ["0", "0"]
},
{
"intrinsic": "fma{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "!llvm.fma.{0.llvm_name}",
"ret": "f(32-64)",
"args": ["0", "0"]
},
{
"intrinsic": "qdmulh{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "sqdmulh.{0.llvm_name}",
"ret": "s(16-32)",
"args": ["0", "0"]
},
{
"intrinsic": "qrdmulh{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "sqrdmulh.{0.llvm_name}",
"ret": "s(16-32)",
"args": ["0", "0"]
},
{
"intrinsic": "mull_{1.data_type}",
"width": [128],
"llvm": "{0.kind}mull.{0.llvm_name}",
"ret": "i(16-64)",
"args": ["0n", "0n"]
},
{
"intrinsic": "qdmull{0.width}_{1.data_type}",
"width": [128],
"llvm": "sqdmull.{0.llvm_name}",
"ret": "s(16-32)",
"args": ["0n", "0n"]
},
{
"intrinsic": "hsub{0.width}_{1.data_type}",
"width": [64, 128],
"llvm": "{0.kind}hsub.{0.llvm_name}",
"ret": "i(8-32)",
"args": ["0", "0"]
},
{
"intrinsic": "qsub{0.width}_{1.data_type}",
"width": [64, 128],
"llvm": "{0.kind}qsub.{0.llvm_name}",
"ret": "i(8-64)",
"args": ["0", "0"]
},
{
"intrinsic": "rsubhn_{1.data_type}",
"width": [64],
"llvm": "rsubhn.{0.llvm_name}",
"ret": "i(8-32)",
"args": ["0w", "0w"]
},
{
"intrinsic": "abd{0.width}_{1.data_type}",
"width": [64, 128],
"llvm": "{0.kind}abd.{0.llvm_name}",
"ret": ["i(8-32)","f(32-64)"],
"args": ["0", "0"]
},
{
"intrinsic": "max{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}max.{0.llvm_name}",
"ret": ["i(8-32)","f(32-64)"],
"args": ["0", "0"]
},
{
"intrinsic": "min{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}min.{0.llvm_name}",
"ret": ["i(8-32)","f(32-64)"],
"args": ["0", "0"]
},
{
"intrinsic": "maxnm{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}maxnm.{0.llvm_name}",
"ret": "f(32-64)",
"args": ["0", "0"]
},
{
"intrinsic": "minnm{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}minnm.{0.llvm_name}",
"ret": "f(32-64)",
"args": ["0", "0"]
},
{
"intrinsic": "shl{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}shl.{0.llvm_name}",
"ret": "i(8-64)",
"args": ["0", "0s"]
},
{
"intrinsic": "qshl{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}qshl.{0.llvm_name}",
"ret": "i(8-64)",
"args": ["0", "0s"]
},
{
"intrinsic": "rshl{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}rshl.{0.llvm_name}",
"ret": "i(8-64)",
"args": ["0", "0s"]
},
{
"intrinsic": "qrshl{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}qrshl.{0.llvm_name}",
"ret": "i(8-64)",
"args": ["0", "0s"]
},
{
"intrinsic": "qshrun_n_{1.data_type}",
"width": [64],
"llvm": "sqshrun.{0.llvm_name}",
"ret": "s(8-32)",
"args": ["0w", "U32"]
},
{
"intrinsic": "qrshrun_n_{1.data_type}",
"width": [64],
"llvm": "sqrshrun.{0.llvm_name}",
"ret": "s(8-32)",
"args": ["0w", "U32"]
},
{
"intrinsic": "qshrn_n_{1.data_type}",
"width": [64],
"llvm": "{0.kind}qshrn.{0.llvm_name}",
"ret": "i(8-32)",
"args": ["0w", "U32"]
},
{
"intrinsic": "rshrn_n_{1.data_type}",
"width": [64],
"llvm": "rshrn.{0.llvm_name}",
"ret": "i(8-32)",
"args": ["0w", "U32"]
},
{
"intrinsic": "qrshrn_n_{1.data_type}",
"width": [64],
"llvm": "{0.kind}qrshrn.{0.llvm_name}",
"ret": "i(8-32)",
"args": ["0w", "U32"]
},
{
"intrinsic": "sri{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "vsri.{0.llvm_name}",
"ret": "i(8-64)",
"args": ["0", "0"]
},
{
"intrinsic": "sli{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "vsli.{0.llvm_name}",
"ret": "i(8-64)",
"args": ["0", "0"]
},
{
"intrinsic": "vqmovn_{1.data_type}",
"width": [64],
"llvm": "{0.kind}qxtn.{0.llvm_name}",
"ret": "i(8-32)",
"args": ["0w"]
},
{
"intrinsic": "abs{0.width}_{0.data_type}",
"width": [64,128],
"llvm": "abs.{0.llvm_name}",
"ret": "s(8-64)",
"args": ["0"]
},
{
"intrinsic": "abs{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "!llvm.fabs.{0.llvm_name}",
"ret": "f(32-64)",
"args": ["0"]
},
{
"intrinsic": "qabs{0.width}_{0.data_type}",
"width": [64,128],
"llvm": "sqabs.{0.llvm_name}",
"ret": "s(8-64)",
"args": ["0"]
},
{
"intrinsic": "qneg{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "sqneg.{0.llvm_name}",
"ret": "s(8-64)",
"args": ["0"]
},
{
"intrinsic": "clz{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "!llvm.ctlz.{0.llvm_name}",
"ret": "i(8-32)",
"args": ["0"]
},
{
"intrinsic": "cls{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "cls.{0.llvm_name}",
"ret": "i(8-32)",
"args": ["0"]
},
{
"intrinsic": "cnt{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "!llvm.ctpop.{0.llvm_name}",
"ret": "i8",
"args": ["0"]
},
{
"intrinsic": "recpe{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}recpe.{0.llvm_name}",
"ret": ["u32","f(32-64)"],
"args": ["0"]
},
{
"intrinsic": "recps{0.width}_{0.data_type}",
"width": [64,128],
"llvm": "frecps.{0.llvm_name}",
"ret": "f(32-64)",
"args": ["0", "0"]
},
{
"intrinsic": "sqrt{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "!llvm.sqrt.{0.llvm_name}",
"ret": "f(32-64)",
"args": ["0"]
},
{
"intrinsic": "rsqrte{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}rsqrte.{0.llvm_name}",
"ret": ["u32","f(32-64)"],
"args": ["0"]
},
{
"intrinsic": "rsqrts{0.width}_{0.data_type}",
"width": [64,128],
"llvm": "frsqrts.{0.llvm_name}",
"ret": "f(32-64)",
"args": ["0", "0"]
},
{
"intrinsic": "rbit{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "rbit.{0.llvm_name}",
"ret": "i8",
"args": ["0"]
},
{
"intrinsic": "padd{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "addp.{0.llvm_name}",
"ret": ["i(8-32)","f32"],
"args": ["0", "0"]
},
{
"intrinsic": "padd{0.width}_{0.data_type}",
"width": [128],
"llvm": "addp.{0.llvm_name}",
"ret": ["i64","f64"],
"args": ["0", "0"]
},
{
"intrinsic": "paddl{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}addlp.{0.llvm_name}.{1.llvm_name}",
"ret": "i(16-64)",
"args": ["0dn"]
},
{
"intrinsic": "pmax{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}maxp.{0.llvm_name}",
"ret": ["i(8-32)","f32"],
"args": ["0", "0"]
},
{
"intrinsic": "pmax{0.width}_{0.data_type}",
"width": [128],
"llvm": "{0.kind}maxp.{0.llvm_name}",
"ret": ["i64","f64"],
"args": ["0", "0"]
},
{
"intrinsic": "pmin{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}minp.{0.llvm_name}",
"ret": ["i(8-32)","f32"],
"args": ["0", "0"]
},
{
"intrinsic": "pmin{0.width}_{0.data_type}",
"width": [128],
"llvm": "{0.kind}minp.{0.llvm_name}",
"ret": ["i64","f64"],
"args": ["0", "0"]
},
{
"intrinsic": "pmaxnm{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}maxnmp.{0.llvm_name}",
"ret": ["i(8-32)","f32"],
"args": ["0", "0"]
},
{
"intrinsic": "pmaxnm{0.width}_{0.data_type}",
"width": [128],
"llvm": "{0.kind}maxnmp.{0.llvm_name}",
"ret": ["i64","f64"],
"args": ["0", "0"]
},
{
"intrinsic": "pminnm{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}minnmp.{0.llvm_name}",
"ret": "f32",
"args": ["0", "0"]
},
{
"intrinsic": "pminnm{0.width}_{0.data_type}",
"width": [128],
"llvm": "{0.kind}minnmp.{0.llvm_name}",
"ret": "f64",
"args": ["0", "0"]
},
{
"intrinsic": "addv{1.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}addv.{0.llvm_name}.{1.llvm_name}",
"ret": ["I(8-32)","F32"],
"args": ["0v"]
},
{
"intrinsic": "addv{1.width}_{0.data_type}",
"width": [128],
"llvm": "{0.kind}addv.{0.llvm_name}.{1.llvm_name}",
"ret": ["I64","F64"],
"args": ["0v"]
},
{
"intrinsic": "addlv{1.width}_{1.data_type}",
"width": [64, 128],
"llvm": "{0.kind}addlv.{0.llvm_name}.{1.llvm_name}",
"ret": "I(16-64)",
"args": ["0vdn"]
},
{
"intrinsic": "maxv{1.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}maxv.{0.llvm_name}.{1.llvm_name}",
"ret": ["I(8-32)","F32"],
"args": ["0v"]
},
{
"intrinsic": "maxv{1.width}_{0.data_type}",
"width": [128],
"llvm": "{0.kind}maxv.{0.llvm_name}.{1.llvm_name}",
"ret": "F64",
"args": ["0v"]
},
{
"intrinsic": "minv{1.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}minv.{0.llvm_name}.{1.llvm_name}",
"ret": ["I(8-32)","F32"],
"args": ["0v"]
},
{
"intrinsic": "minv{1.width}_{0.data_type}",
"width": [128],
"llvm": "{0.kind}minv.{0.llvm_name}.{1.llvm_name}",
"ret": "F64",
"args": ["0v"]
},
{
"intrinsic": "maxnmv{1.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}maxnmv.{0.llvm_name}.{1.llvm_name}",
"ret": "F32",
"args": ["0v"]
},
{
"intrinsic": "maxnmv{1.width}_{0.data_type}",
"width": [128],
"llvm": "{0.kind}maxnmv.{0.llvm_name}.{1.llvm_name}",
"ret": "F64",
"args": ["0v"]
},
{
"intrinsic": "minnmv{1.width}_{0.data_type}",
"width": [64, 128],
"llvm": "{0.kind}minnmv.{0.llvm_name}.{1.llvm_name}",
"ret": "F32",
"args": ["0v"]
},
{
"intrinsic": "minnmv{1.width}_{0.data_type}",
"width": [128],
"llvm": "{0.kind}minnmv.{0.llvm_name}.{1.llvm_name}",
"ret": "F64",
"args": ["0v"]
},
{
"intrinsic": "qtbl1{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "tbl1.{0.llvm_name}",
"ret": "i8",
"args": ["0x128", "0u"]
},
{
"intrinsic": "qtbx1{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "tbx1.{0.llvm_name}",
"ret": "i8",
"args": ["0", "0x128", "0u"]
},
{
"intrinsic": "qtbl2{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "tbl2.{0.llvm_name}",
"ret": "i8",
"args": ["(0x128,0x128)f", "0u"]
},
{
"intrinsic": "qtbx2{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "tbx2.{0.llvm_name}",
"ret": "i8",
"args": ["(0x128,0x128)f", "0u"]
},
{
"intrinsic": "qtbl3{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "tbl3.{0.llvm_name}",
"ret": "i8",
"args": ["(0x128,0x128,0x128)f", "0u"]
},
{
"intrinsic": "qtbx3{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "tbx3.{0.llvm_name}",
"ret": "i8",
"args": ["0", "(0x128,0x128,0x128)f", "0u"]
},
{
"intrinsic": "qtbl4{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "tbl4.{0.llvm_name}",
"ret": "i8",
"args": ["(0x128,0x128,0x128,0x128)f", "0u"]
},
{
"intrinsic": "qtbx4{0.width}_{0.data_type}",
"width": [64, 128],
"llvm": "tbx4.{0.llvm_name}",
"ret": "i8",
"args": ["0", "(0x128,0x128,0x128,0x128)f", "0u"]
}
]
}

File diff suppressed because it is too large Load Diff