Add support for Vector Maximum on PowerPC
This commit is contained in:
parent
ade5ead38e
commit
a718c813ed
@ -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,
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user