Add vsplit and vconcat instructions.

Add support for two new type variable functions: half_vector() and
double_vector().

Use these two instructions to break down unsupported SIMD types and
build them up again.
This commit is contained in:
Jakob Stoklund Olesen
2017-03-07 14:15:55 -08:00
parent 37b2e94c72
commit fd58b7cc29
7 changed files with 97 additions and 10 deletions

View File

@@ -173,9 +173,9 @@ fn convert_from_abi(dfg: &mut DataFlowGraph,
// Construct a `ty` by concatenating two halves of a vector.
ValueConversion::VectorSplit => {
let abi_ty = ty.half_vector().expect("Invalid type for conversion");
let _lo = convert_from_abi(dfg, pos, entry, abi_arg, abi_types, abi_ty);
let _hi = convert_from_abi(dfg, pos, entry, abi_arg, abi_types, abi_ty);
unimplemented!()
let lo = convert_from_abi(dfg, pos, entry, abi_arg, abi_types, abi_ty);
let hi = convert_from_abi(dfg, pos, entry, abi_arg, abi_types, abi_ty);
dfg.ins(pos).vconcat(lo, hi)
}
// Construct a `ty` by bit-casting from an integer type.
ValueConversion::IntBits => {