On Wed, Apr 25, 2018 at 03:17:28PM -0500, Indu Bhagat wrote:
> In function minmax_replacement in tree-ssa-phiopt.c, MIN_EXPR/MAX_EXPR
> are substituted for when the following condition is false - (HONOR_NANS
> (type) || HONOR_SIGNED_ZEROS (type)). So for FP mode, this is false when
> _both_ of the following conditions are fulfilled : 1. flag_signed_zeros
> is zero and 2. flag_finite_math_only is set. So, the documentation in
> aarch64-simd.md is partially misleading. Here is a patch to correct
> that. Thanks
This is OK for trunk.
Thanks,
James
> gcc/ChangeLog:
>
> * config/aarch64/aarch64-simd.md: correct flags text for
> MIN_EXPR replacement
> diff --git a/gcc/config/aarch64/aarch64-simd.md
> b/gcc/config/aarch64/aarch64-simd.md
> index 1154fc3..7fd20fd 100644
> --- a/gcc/config/aarch64/aarch64-simd.md
> +++ b/gcc/config/aarch64/aarch64-simd.md
> @@ -2211,8 +2211,9 @@
> ;; Max/Min are introduced by idiom recognition by GCC's mid-end. An
> ;; expression like:
> ;; a = (b < c) ? b : c;
> -;; is idiom-matched as MIN_EXPR only if -ffinite-math-only is enabled
> -;; either explicitly or indirectly via -ffast-math.
> +;; is idiom-matched as MIN_EXPR only if -ffinite-math-only and
> +;; -fno-signed-zeros are enabled either explicitly or indirectly via
> +;; -ffast-math.
> ;;
> ;; MIN_EXPR and MAX_EXPR eventually map to 'smin' and 'smax' in RTL.
> ;; The 'smax' and 'smin' RTL standard pattern names do not specify which