diff mbox series

[SVE,ACLE] Allow overloaded @ md patterns + small fixes

Message ID 87in2s4q8d.fsf@arm.com
State New
Headers show
Series [SVE,ACLE] Allow overloaded @ md patterns + small fixes | expand

Commit Message

Richard Sandiford Sept. 26, 2018, 8:28 a.m. UTC
The first patch allows "@foo_<params>" patterns to have the same "@foo_"
even if they have a different number of operands.  There are no current
users of this on trunk, so I won't commit it there until we've had a bit
more time to try it out.

Tested on aarch64-linux-gnu and applied to aarch64/sve-acle-branch.

Richard
diff mbox series

Patch

[SVE ACLE] Fix optab names for FMAXNM and FMINNM

FMAXNM and FMINNM should map to the fmax and fmin optabs, since they're
the ones that implement IEEE semantics.  The names of the fake FMAX and
FMIN optabs doesn't matter, but we might as well use "_nan" for
consistency with the other AArch64 patterns.

Fixes aarch64/sve/maxmin_strict_1.c.


diff --git a/gcc/config/aarch64/aarch64-sve.md b/gcc/config/aarch64/aarch64-sve.md
index 558c58e42c5..ec5a6901037 100644
--- a/gcc/config/aarch64/aarch64-sve.md
+++ b/gcc/config/aarch64/aarch64-sve.md
@@ -1800,7 +1800,7 @@ 
 	   (const_int SVE_ALLOW_NEW_FAULTS)
 	   (match_operand:SVE_F 1 "register_operand")
 	   (match_operand:SVE_F 2 "register_operand")]
-	   SVE_COND_MAXMIN))]
+	  SVE_COND_MAXMIN))]
   "TARGET_SVE"
   {
     operands[3] = force_reg (<VPRED>mode, CONSTM1_RTX (<VPRED>mode));
@@ -1811,11 +1811,11 @@ 
 (define_insn "@aarch64_pred_<maxmin_uns><mode>"
   [(set (match_operand:SVE_F 0 "register_operand" "=w, ?&w")
 	(unspec:SVE_F
-	  [(match_operand:<VPRED> 1 "register_operand" "Upl,  Upl")
+	  [(match_operand:<VPRED> 1 "register_operand" "Upl, Upl")
 	   (match_operand:SI 4 "const_int_operand" "i, i")
 	   (match_operand:SVE_F 2 "register_operand" "%0, w")
 	   (match_operand:SVE_F 3 "register_operand" "w, w")]
-	   SVE_COND_MAXMIN))]
+	  SVE_COND_MAXMIN))]
   "TARGET_SVE"
   "@
    <maxmin_uns_op>\t%0.<Vetype>, %1/m, %0.<Vetype>, %3.<Vetype>
diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md
index 781ab434942..4b025ba64cc 100644
--- a/gcc/config/aarch64/iterators.md
+++ b/gcc/config/aarch64/iterators.md
@@ -1631,10 +1631,10 @@ 
 			      (UNSPEC_FMINV "smin_nan")
 			      (UNSPEC_FMAXNM "fmax")
 			      (UNSPEC_FMINNM "fmin")
-			      (UNSPEC_COND_FMAX "fmax")
-			      (UNSPEC_COND_FMIN "fmin")
-			      (UNSPEC_COND_FMAXNM "fmaxnm")
-			      (UNSPEC_COND_FMINNM "fminnm")])
+			      (UNSPEC_COND_FMAX "fmax_nan")
+			      (UNSPEC_COND_FMIN "fmin_nan")
+			      (UNSPEC_COND_FMAXNM "fmax")
+			      (UNSPEC_COND_FMINNM "fmin")])
 
 (define_int_attr  maxmin_uns_op [(UNSPEC_UMAXV "umax")
 				 (UNSPEC_UMINV "umin")