[Bug middle-end/102464] Miss optimization for (_Float16) sqrtf ((float) f16)

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 25 08:54:07 GMT 2021


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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:1a07bc9cda77b1211e95ae295b30e46c0d9ee222

commit r12-4651-g1a07bc9cda77b1211e95ae295b30e46c0d9ee222
Author: liuhongt <hongtao.liu@intel.com>
Date:   Mon Oct 25 10:51:33 2021 +0800

    Simplify (_Float16) sqrtf((float) a) to .SQRT(a) when a is a _Float16
value.

    Similar for sqrt/sqrtl.

    gcc/ChangeLog:

            PR target/102464
            * match.pd: Simplify (_Float16) sqrtf((float) a) to .SQRT(a)
            when direct_internal_fn_supported_p, similar for sqrt/sqrtl.

    gcc/testsuite/ChangeLog:

            PR target/102464
            * gcc.target/i386/pr102464-sqrtph.c: New test.
            * gcc.target/i386/pr102464-sqrtsh.c: New test.


More information about the Gcc-bugs mailing list