Add support for Vector Average on PowerPC
This commit is contained in:
parent
19c4bdb4e1
commit
8b78ea5b84
@ -114,6 +114,13 @@
|
||||
"llvm": "vmulo{0.kind}{1.data_type_short}",
|
||||
"ret": "i(16-32)",
|
||||
"args": ["0N", "1"]
|
||||
},
|
||||
{
|
||||
"intrinsic": "avg{0.kind}{0.data_type_short}",
|
||||
"width": [128],
|
||||
"llvm": "vavg{0.kind}{0.data_type_short}",
|
||||
"ret": "i(8-32)",
|
||||
"args": ["0", "0"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -252,6 +252,36 @@ pub fn find(name: &str) -> Option<Intrinsic> {
|
||||
output: &::U32x4,
|
||||
definition: Named("llvm.ppc.altivec.vmulouh")
|
||||
},
|
||||
"_vec_avgsb" => Intrinsic {
|
||||
inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
|
||||
output: &::I8x16,
|
||||
definition: Named("llvm.ppc.altivec.vavgsb")
|
||||
},
|
||||
"_vec_avgub" => Intrinsic {
|
||||
inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS },
|
||||
output: &::U8x16,
|
||||
definition: Named("llvm.ppc.altivec.vavgub")
|
||||
},
|
||||
"_vec_avgsh" => Intrinsic {
|
||||
inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
|
||||
output: &::I16x8,
|
||||
definition: Named("llvm.ppc.altivec.vavgsh")
|
||||
},
|
||||
"_vec_avguh" => Intrinsic {
|
||||
inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
|
||||
output: &::U16x8,
|
||||
definition: Named("llvm.ppc.altivec.vavguh")
|
||||
},
|
||||
"_vec_avgsw" => Intrinsic {
|
||||
inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
|
||||
output: &::I32x4,
|
||||
definition: Named("llvm.ppc.altivec.vavgsw")
|
||||
},
|
||||
"_vec_avguw" => Intrinsic {
|
||||
inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
|
||||
output: &::U32x4,
|
||||
definition: Named("llvm.ppc.altivec.vavguw")
|
||||
},
|
||||
_ => return None,
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user