Convert fadd..fmax_pseudo to ISLE (AArch64) (#4452)
Converted the existing implementations for the following Opcodes to ISLE on AArch64: - `fadd` - `fsub` - `fmul` - `fdiv` - `fmin` - `fmax` - `fmin_pseudo` - `fmax_pseudo` Copyright (c) 2022 Arm Limited
This commit is contained in:
@@ -19,6 +19,34 @@
|
||||
(rule (lower (has_type ty @ (dynamic_lane _ _) (fsub x y)))
|
||||
(value_reg (vec_rrr (VecALUOp.Fsub) (put_in_reg x) (put_in_reg y) (vector_size ty))))
|
||||
|
||||
;;;; Rules for `fmul` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (has_type ty @ (dynamic_lane _ _) (fmul x y)))
|
||||
(value_reg (vec_rrr (VecALUOp.Fmul) (put_in_reg x) (put_in_reg y) (vector_size ty))))
|
||||
|
||||
;;;; Rules for `fdiv` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (has_type ty @ (dynamic_lane _ _) (fdiv x y)))
|
||||
(value_reg (vec_rrr (VecALUOp.Fdiv) (put_in_reg x) (put_in_reg y) (vector_size ty))))
|
||||
|
||||
;;;; Rules for `fmin` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (has_type ty @ (dynamic_lane _ _) (fmin x y)))
|
||||
(value_reg (vec_rrr (VecALUOp.Fmin) (put_in_reg x) (put_in_reg y) (vector_size ty))))
|
||||
|
||||
;;;; Rules for `fmax` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (has_type ty @ (dynamic_lane _ _) (fmax x y)))
|
||||
(value_reg (vec_rrr (VecALUOp.Fmax) (put_in_reg x) (put_in_reg y) (vector_size ty))))
|
||||
|
||||
;;;; Rules for `fmin_pseudo` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (has_type ty @ (dynamic_lane _ _) (fmin_pseudo x y)))
|
||||
(value_reg (bsl ty
|
||||
(vec_rrr (VecALUOp.Fcmgt) (put_in_reg x) (put_in_reg y)
|
||||
(vector_size ty)) (put_in_reg y) (put_in_reg x))))
|
||||
|
||||
;;;; Rules for `fmax_pseudo` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (has_type ty @ (dynamic_lane _ _) (fmax_pseudo x y)))
|
||||
(value_reg (bsl ty
|
||||
(vec_rrr (VecALUOp.Fcmgt) (put_in_reg y) (put_in_reg x)
|
||||
(vector_size ty)) (put_in_reg y) (put_in_reg x))))
|
||||
|
||||
;;; Rules for `dynamic_stack_addr` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (dynamic_stack_addr stack_slot))
|
||||
(let ((dst WritableReg (temp_writable_reg $I64))
|
||||
|
||||
Reference in New Issue
Block a user