+2020-03-10 Jiufu Guo <guojiufu@linux.ibm.com>
+
+ PR target/93709
+ * gcc/config/rs6000/rs6000.c (rs6000_emit_p9_fp_minmax): Check
+ NAN and SIGNED_ZEROR for smax/smin.
+
2020-03-10 Will Schmidt <will_schmidt@vnet.ibm.com>
PR target/90763
if (rtx_equal_p (op0, true_cond) && rtx_equal_p (op1, false_cond))
;
- else if (rtx_equal_p (op1, true_cond) && rtx_equal_p (op0, false_cond))
+ /* Only when NaNs and signed-zeros are not in effect, smax could be
+ used for `op0 < op1 ? op1 : op0`, and smin could be used for
+ `op0 > op1 ? op1 : op0`. */
+ else if (rtx_equal_p (op1, true_cond) && rtx_equal_p (op0, false_cond)
+ && !HONOR_NANS (compare_mode) && !HONOR_SIGNED_ZEROS (compare_mode))
max_p = !max_p;
else
+2020-03-10 Jiufu Guo <guojiufu@linux.ibm.com>
+
+ PR target/93709
+ * gcc.target/powerpc/p9-minmax-3.c: New test.
+
2020-03-10 Will Schmidt <will_schmidt@vnet.ibm.com>
PR target/90763
--- /dev/null
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-mdejagnu-cpu=power9 -O2 -mpower9-minmax" } */
+/* { dg-final { scan-assembler-not "xsmaxcdp" } } */
+/* { dg-final { scan-assembler-not "xsmincdp" } } */
+
+double
+dbl_max1 (double a, double b)
+{
+ return a < b ? b : a;
+}
+
+double
+dbl_min1 (double a, double b)
+{
+ return a > b ? b : a;
+}