提交 a718c813 编写于 作者: L Luca Barbato

Add support for Vector Maximum on PowerPC

上级 ade5ead3
......@@ -58,6 +58,13 @@
"llvm": "vcmpgt{1.kind}{1.data_type_short}",
"ret": "s(8-32)",
"args": ["0", "1"]
},
{
"intrinsic": "max{0.kind}{0.data_type_short}",
"width": [128],
"llvm": "vmax{0.kind}{0.data_type_short}",
"ret": "i(8-32)",
"args": ["0", "0"]
}
]
}
......@@ -82,6 +82,36 @@ pub fn find(name: &str) -> Option<Intrinsic> {
output: &::I32x4,
definition: Named("llvm.ppc.altivec.vcmpgtsw")
},
"_vec_maxsb" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
output: &::I8x16,
definition: Named("llvm.ppc.altivec.vmaxsb")
},
"_vec_maxub" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS },
output: &::U8x16,
definition: Named("llvm.ppc.altivec.vmaxub")
},
"_vec_maxsh" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
output: &::I16x8,
definition: Named("llvm.ppc.altivec.vmaxsh")
},
"_vec_maxuh" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
output: &::U16x8,
definition: Named("llvm.ppc.altivec.vmaxuh")
},
"_vec_maxsw" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
output: &::I32x4,
definition: Named("llvm.ppc.altivec.vmaxsw")
},
"_vec_maxuw" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
output: &::U32x4,
definition: Named("llvm.ppc.altivec.vmaxuw")
},
_ => return None,
})
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册