Add support for Vector Pack Pixel on PowerPC

The llvm intrinsic uses signed integers.
This commit is contained in:
Luca Barbato 2017-08-04 00:19:58 +00:00
parent 1773233d74
commit 88fc6dc369
2 changed files with 12 additions and 0 deletions

View File

@ -135,6 +135,13 @@
"llvm": "vpk{1.kind}{1.data_type_short}{0.kind}s",
"ret": "u(8-16)",
"args": ["0Ws", "1"]
},
{
"intrinsic": "packpx",
"width": [128],
"llvm": "vpkpx",
"ret": "s16",
"args": ["s32", "s32"]
}
]
}

View File

@ -312,6 +312,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
output: &::U16x8,
definition: Named("llvm.ppc.altivec.vpkswus")
},
"_vec_packpx" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
output: &::I16x8,
definition: Named("llvm.ppc.altivec.vpkpx")
},
_ => return None,
})
}