Remove the widening_pairwise_dot_product_s clif instruction (#5889)

This was added for the wasm SIMD proposal but I've been poking around at
this recently and the instruction can instead be represented by its
component parts with the same semantics I believe. This commit removes
the instruction and instead represents it with the existing
`iadd_pairwise` instruction (among others) and updates backends to with
new pattern matches to have the same codegen as before.

This interestingly entirely removed the codegen rule with no replacement
on the AArch64 backend as the existing rules all existed to produce the
same codegen.
This commit is contained in:
Alex Crichton
2023-02-27 12:43:43 -06:00
committed by GitHub
parent 6cf7155052
commit 9b86a0b9b1
8 changed files with 46 additions and 88 deletions

View File

@@ -1308,26 +1308,6 @@ where
// actually need to emit a fence here.
ControlFlow::Continue
}
Opcode::WideningPairwiseDotProductS => {
let ctrl_ty = types::I16X8;
let new_type = ctrl_ty.merge_lanes().unwrap();
let arg0 = extractlanes(&arg(0)?, ctrl_ty)?;
let arg1 = extractlanes(&arg(1)?, ctrl_ty)?;
let new_vec = arg0
.chunks(2)
.into_iter()
.zip(arg1.chunks(2))
.into_iter()
.map(|(x, y)| {
let mut z = 0i128;
for (lhs, rhs) in x.into_iter().zip(y.into_iter()) {
z += lhs.clone().into_int()? * rhs.clone().into_int()?;
}
Value::int(z, new_type.lane_type())
})
.collect::<ValueResult<Vec<_>>>()?;
assign(vectorizelanes(&new_vec, new_type)?)
}
Opcode::SqmulRoundSat => {
let lane_type = ctrl_ty.lane_type();
let double_width = ctrl_ty.double_width().unwrap().lane_type();