+2020-04-24 Haijian Zhang <z.zhanghaijian@huawei.com>
+
+ PR rtl-optimization/94708
+ * combine.c (simplify_if_then_else): Add check for
+ !HONOR_NANS (mode) && !HONOR_SIGNED_ZEROS (mode).
+
2020-04-23 Martin Sebor <msebor@redhat.com>
PR driver/90983
/* Look for MIN or MAX. */
- if ((! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations)
+ if ((! FLOAT_MODE_P (mode)
+ || (flag_unsafe_math_optimizations
+ && !HONOR_NANS (mode)
+ && !HONOR_SIGNED_ZEROS (mode)))
&& comparison_p
&& rtx_equal_p (XEXP (cond, 0), true_rtx)
&& rtx_equal_p (XEXP (cond, 1), false_rtx)
+2020-04-24 Haijian Zhang <z.zhanghaijian@huawei.com>
+
+ PR rtl-optimization/94708
+ * gfortran.dg/pr94708.f90: New test.
+
2020-04-23 David Edelsohn <dje.gcc@gmail.com>
* gcc.dg/torture/pr90020.c: Skip on AIX.
--- /dev/null
+! { dg-do compile { target aarch64*-*-* } }
+! { dg-options "-O2 -funsafe-math-optimizations -fdump-rtl-combine" }
+
+subroutine f(vara,varb,varc,res)
+ REAL, INTENT(IN) :: vara,varb,varc
+ REAL, INTENT(out) :: res
+
+ res = vara
+ if (res .lt. varb) res = varb
+ if (res .gt. varc) res = varc
+end subroutine
+
+! { dg-final { scan-rtl-dump-not "smin" "combine" } }