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:
@@ -138,6 +138,14 @@
|
||||
(vec_add ty x (vec_lshr_by_byte x size))
|
||||
(vec_add ty y (vec_lshr_by_byte y size)))))
|
||||
|
||||
;; special case for the `i32x4.dot_i16x8_s` wasm instruction
|
||||
(rule 1 (lower
|
||||
(has_type dst_ty (iadd_pairwise
|
||||
(imul (swiden_low x @ (value_type src_ty)) (swiden_low y))
|
||||
(imul (swiden_high x) (swiden_high y)))))
|
||||
(vec_add dst_ty (vec_smul_even src_ty x y)
|
||||
(vec_smul_odd src_ty x y)))
|
||||
|
||||
|
||||
;;;; Rules for `isub` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
@@ -484,15 +492,6 @@
|
||||
(mov_to_vec128 $I64X2 res_0 res_1)))
|
||||
|
||||
|
||||
;;;; Rules for `widening_pairwise_dot_product_s` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; Widening pairwise dot product of two vector registers.
|
||||
(rule (lower (has_type dst_ty (widening_pairwise_dot_product_s
|
||||
x @ (value_type src_ty) y)))
|
||||
(vec_add dst_ty (vec_smul_even src_ty x y)
|
||||
(vec_smul_odd src_ty x y)))
|
||||
|
||||
|
||||
;;;; Rules for `sqmul_round_sat` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; Fixed-point multiplication of two vector registers.
|
||||
|
||||
Reference in New Issue
Block a user