From: Richard Sandiford Date: Thu, 20 Feb 2020 14:16:12 +0000 (+0000) Subject: aarch64: Fix inverted approx_sqrt condition X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=902d28bd838c4d3f9d28832d387812da2232e1ec;p=gcc.git aarch64: Fix inverted approx_sqrt condition The fix for PR80530 included an accidental flipping of the flag_finite_math_only check, so that -ffinite-math-only (and thus -ffast-math) disabled approximate sqrt rather than enabling it. This is tested by later patches but seemed worth splitting out. 2020-02-21 Richard Sandiford gcc/ * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Fix inverted flag_finite_math_only condition. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 15ce49c8c87..16a23d00944 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-02-21 Richard Sandiford + + * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Fix inverted + flag_finite_math_only condition. + 2020-02-20 Uroš Bizjak PR target/93828 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 4a34dce5d79..6fb567ae4bf 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -12761,7 +12761,7 @@ aarch64_emit_approx_sqrt (rtx dst, rtx src, bool recp) & AARCH64_APPROX_MODE (mode)))) return false; - if (flag_finite_math_only + if (!flag_finite_math_only || flag_trapping_math || !flag_unsafe_math_optimizations || optimize_function_for_size_p (cfun))