Add Vector Compare Equal
This commit is contained in:
parent
4f6c03e243
commit
e2b5a6b3bc
2 changed files with 28 additions and 2 deletions
|
|
@ -3,8 +3,12 @@
|
|||
"intrinsic_prefix": "_vec_",
|
||||
"llvm_prefix": "llvm.ppc.altivec.",
|
||||
"number_info": {
|
||||
"unsigned": {},
|
||||
"signed": {},
|
||||
"unsigned": {
|
||||
"data_type_short": { "8": "b", "16": "h", "32": "w", "64": "d" }
|
||||
},
|
||||
"signed": {
|
||||
"data_type_short": { "8": "b", "16": "h", "32": "w", "64": "d" }
|
||||
},
|
||||
"float": {}
|
||||
},
|
||||
"width_info": {
|
||||
|
|
@ -31,6 +35,13 @@
|
|||
"llvm": "vcmpbfp",
|
||||
"ret": "s32",
|
||||
"args": ["f32", "f32"]
|
||||
},
|
||||
{
|
||||
"intrinsic": "cmpeq{0.data_type_short}",
|
||||
"width": [128],
|
||||
"llvm": "vcmpequ{0.data_type_short}",
|
||||
"ret": "s(8-32)",
|
||||
"args": ["0", "0"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,21 @@ pub fn find(name: &str) -> Option<Intrinsic> {
|
|||
output: &::I32x4,
|
||||
definition: Named("llvm.ppc.altivec.vcmpbfp")
|
||||
},
|
||||
"_vec_cmpeqb" => Intrinsic {
|
||||
inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
|
||||
output: &::I8x16,
|
||||
definition: Named("llvm.ppc.altivec.vcmpequb")
|
||||
},
|
||||
"_vec_cmpeqh" => Intrinsic {
|
||||
inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
|
||||
output: &::I16x8,
|
||||
definition: Named("llvm.ppc.altivec.vcmpequh")
|
||||
},
|
||||
"_vec_cmpeqw" => Intrinsic {
|
||||
inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
|
||||
output: &::I32x4,
|
||||
definition: Named("llvm.ppc.altivec.vcmpequw")
|
||||
},
|
||||
_ => return None,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue