Add support for Vector Pack Saturated Unsigned on PowerPC

This commit is contained in:
Luca Barbato 2017-08-04 00:19:58 +00:00
parent c2cdcefead
commit 1773233d74
2 changed files with 17 additions and 0 deletions

View File

@ -128,6 +128,13 @@
"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"]
}
]
}

View File

@ -302,6 +302,16 @@ pub fn find(name: &str) -> Option<Intrinsic> {
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")
},
_ => return None,
})
}