Auto merge of #43897 - lu-zero:master, r=alexcrichton

More PowerPC intrinsics
This commit is contained in:
bors 2017-08-18 03:15:01 +00:00
commit 7f3be0a4b2
2 changed files with 90 additions and 0 deletions

View file

@ -121,6 +121,41 @@
"llvm": "vavg{0.kind}{0.data_type_short}",
"ret": "i(8-32)",
"args": ["0", "0"]
},
{
"intrinsic": "packs{0.kind}{1.data_type_short}",
"width": [128],
"llvm": "vpk{0.kind}{1.data_type_short}{0.kind}s",
"ret": "i(8-16)",
"args": ["0W", "1"]
},
{
"intrinsic": "packsu{1.kind}{1.data_type_short}",
"width": [128],
"llvm": "vpk{1.kind}{1.data_type_short}{0.kind}s",
"ret": "u(8-16)",
"args": ["0Ws", "1"]
},
{
"intrinsic": "packpx",
"width": [128],
"llvm": "vpkpx",
"ret": "s16",
"args": ["s32", "s32"]
},
{
"intrinsic": "unpackl{1.kind}{1.data_type_short}",
"width": [128],
"llvm": "vupkl{1.kind}{1.data_type_short}",
"ret": "s(16-32)",
"args": ["0N"]
},
{
"intrinsic": "unpackh{1.kind}{1.data_type_short}",
"width": [128],
"llvm": "vupkh{1.kind}{1.data_type_short}",
"ret": "s(16-32)",
"args": ["0N"]
}
]
}

View file

@ -282,6 +282,61 @@ pub fn find(name: &str) -> Option<Intrinsic> {
output: &::U32x4,
definition: Named("llvm.ppc.altivec.vavguw")
},
"_vec_packssh" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
output: &::I8x16,
definition: Named("llvm.ppc.altivec.vpkshss")
},
"_vec_packsuh" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
output: &::U8x16,
definition: Named("llvm.ppc.altivec.vpkuhus")
},
"_vec_packssw" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
output: &::I16x8,
definition: Named("llvm.ppc.altivec.vpkswss")
},
"_vec_packsuw" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
output: &::U16x8,
definition: Named("llvm.ppc.altivec.vpkuwus")
},
"_vec_packsush" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
output: &::U8x16,
definition: Named("llvm.ppc.altivec.vpkshus")
},
"_vec_packsusw" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
output: &::U16x8,
definition: Named("llvm.ppc.altivec.vpkswus")
},
"_vec_packpx" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
output: &::I16x8,
definition: Named("llvm.ppc.altivec.vpkpx")
},
"_vec_unpacklsb" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 1] = [&::I8x16]; &INPUTS },
output: &::I16x8,
definition: Named("llvm.ppc.altivec.vupklsb")
},
"_vec_unpacklsh" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 1] = [&::I16x8]; &INPUTS },
output: &::I32x4,
definition: Named("llvm.ppc.altivec.vupklsh")
},
"_vec_unpackhsb" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 1] = [&::I8x16]; &INPUTS },
output: &::I16x8,
definition: Named("llvm.ppc.altivec.vupkhsb")
},
"_vec_unpackhsh" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 1] = [&::I16x8]; &INPUTS },
output: &::I32x4,
definition: Named("llvm.ppc.altivec.vupkhsh")
},
_ => return None,
})
}