+2015-12-02 David Sherwood <david.sherwood@arm.com>
+
+ * config/aarch64/aarch64.md: New pattern.
+ * config/aarch64/aarch64-simd.md: Likewise.
+ * config/aarch64/iterators.md: New unspecs, iterators.
+
2015-12-02 Pierre-Marie de Rodat <derodat@adacore.com>
* dwarf2out.c (dwar2out_var_location): In addition to notes,
[(set_attr "type" "neon_fp_minmax_<Vetype><q>")]
)
+;; Auto-vectorized forms for the IEEE-754 fmax()/fmin() functions
+(define_insn "<fmaxmin><mode>3"
+ [(set (match_operand:VDQF 0 "register_operand" "=w")
+ (unspec:VDQF [(match_operand:VDQF 1 "register_operand" "w")
+ (match_operand:VDQF 2 "register_operand" "w")]
+ FMAXMIN))]
+ "TARGET_SIMD"
+ "<fmaxmin_op>\\t%0.<Vtype>, %1.<Vtype>, %2.<Vtype>"
+ [(set_attr "type" "neon_fp_minmax_<Vetype><q>")]
+)
+
;; 'across lanes' add.
(define_expand "reduc_plus_scal_<mode>"
[(set_attr "type" "f_minmax<s>")]
)
+;; Scalar forms for the IEEE-754 fmax()/fmin() functions
+(define_insn "<fmaxmin><mode>3"
+ [(set (match_operand:GPF 0 "register_operand" "=w")
+ (unspec:GPF [(match_operand:GPF 1 "register_operand" "w")
+ (match_operand:GPF 2 "register_operand" "w")]
+ FMAXMIN))]
+ "TARGET_FLOAT"
+ "<fmaxmin_op>\\t%<s>0, %<s>1, %<s>2"
+ [(set_attr "type" "f_minmax<s>")]
+)
+
;; For copysign (x, y), we want to generate:
;;
;; LDR d2, #(1 << 63)
UNSPEC_VEC_SHR ; Used in aarch64-simd.md.
UNSPEC_SQRDMLAH ; Used in aarch64-simd.md.
UNSPEC_SQRDMLSH ; Used in aarch64-simd.md.
+ UNSPEC_FMAXNM ; Used in aarch64-simd.md.
+ UNSPEC_FMINNM ; Used in aarch64-simd.md.
])
;; ------------------------------------------------------------------
(define_int_iterator FMAXMIN_UNS [UNSPEC_FMAX UNSPEC_FMIN])
+(define_int_iterator FMAXMIN [UNSPEC_FMAXNM UNSPEC_FMINNM])
+
(define_int_iterator VQDMULH [UNSPEC_SQDMULH UNSPEC_SQRDMULH])
(define_int_iterator USSUQADD [UNSPEC_SUQADD UNSPEC_USQADD])
(UNSPEC_FMINNMV "fminnm")
(UNSPEC_FMINV "fmin")])
+(define_int_attr fmaxmin [(UNSPEC_FMAXNM "fmax")
+ (UNSPEC_FMINNM "fmin")])
+
+(define_int_attr fmaxmin_op [(UNSPEC_FMAXNM "fmaxnm")
+ (UNSPEC_FMINNM "fminnm")])
+
(define_int_attr sur [(UNSPEC_SHADD "s") (UNSPEC_UHADD "u")
(UNSPEC_SRHADD "sr") (UNSPEC_URHADD "ur")
(UNSPEC_SHSUB "s") (UNSPEC_UHSUB "u")
+2015-12-02 David Sherwood <david.sherwood@arm.com>
+
+ * gcc.target/aarch64/fmaxmin.c: New test.
+
2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
* gfortran.dg/goacc/coarray.f95: XFAIL.