https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80530

--- Comment #3 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Author: rearnsha
Date: Thu Apr 27 14:09:55 2017
New Revision: 247340

URL: https://gcc.gnu.org/viewcvs?rev=247340&root=gcc&view=rev
Log:
[AArch64] Fix for gcc-7 regression PR 80530


This patch fixes the regression caused by the changes to add square root
estimation when compiling for xgene-1 or exynos-m1 targets.

The issue is that the expand path for the reciprocal estimate square
root pattern assumes that pattern cannot fail once it has been decided
that this expansion path is available, but because the logic deep inside
aarch64_emit_approx_sqrt() differs from use_rsqrt_p() the two disagree
as to what is safe.

This patch refactors the logic to ensure that we cannot unknowingly make
different choices here.

        PR target/80530
        * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
        that the logic for permitting reciprocal estimates matches that
        in use_rsqrt_p.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/aarch64/aarch64.c

Reply via email to