[AArch64] i64x2 support for min/max (#4575)

Also added interpreter support for vector min/max.

Copyright (c) 2022, Arm Limited.
This commit is contained in:
Sam Parker
2022-08-02 19:42:05 +01:00
committed by GitHub
parent c77bec4dcb
commit 37cd96beff
4 changed files with 117 additions and 32 deletions

View File

@@ -693,15 +693,27 @@
(rule (lower (has_type ty @ (not_i64x2) (imin x y)))
(vec_rrr (VecALUOp.Smin) x y (vector_size ty)))
(rule (lower (has_type $I64X2 (imin x y)))
(bsl $I64X2 (vec_rrr (VecALUOp.Cmgt) y x (VectorSize.Size64x2)) x y))
(rule (lower (has_type ty @ (not_i64x2) (umin x y)))
(vec_rrr (VecALUOp.Umin) x y (vector_size ty)))
(rule (lower (has_type $I64X2 (umin x y)))
(bsl $I64X2 (vec_rrr (VecALUOp.Cmhi) y x (VectorSize.Size64x2)) x y))
(rule (lower (has_type ty @ (not_i64x2) (imax x y)))
(vec_rrr (VecALUOp.Smax) x y (vector_size ty)))
(rule (lower (has_type $I64X2 (imax x y)))
(bsl $I64X2 (vec_rrr (VecALUOp.Cmgt) x y (VectorSize.Size64x2)) x y))
(rule (lower (has_type ty @ (not_i64x2) (umax x y)))
(vec_rrr (VecALUOp.Umax) x y (vector_size ty)))
(rule (lower (has_type $I64X2 (umax x y)))
(bsl $I64X2 (vec_rrr (VecALUOp.Cmhi) x y (VectorSize.Size64x2)) x y))
;;;; Rules for `uextend` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; General rule for extending input to an output which fits in a single