Simplify (_Float16) ceil ((double) x) to .CEIL (x) when available.
authorliuhongt <hongtao.liu@intel.com>
Fri, 24 Sep 2021 11:17:42 +0000 (19:17 +0800)
committerliuhongt <hongtao.liu@intel.com>
Fri, 8 Oct 2021 02:09:55 +0000 (10:09 +0800)
commit613196462a62a28de8414b9023ec2be9a29ac3dc
tree78d57aa8ddeb6ac147d6a534a154c9225ff36e43
parent77ca2cfcdcccee3c8e8aeaf1d03e9920893d2486
Simplify (_Float16) ceil ((double) x) to .CEIL (x) when available.

gcc/ChangeLog:

PR target/102464
* config/i386/i386.c (ix86_optab_supported_p):
Return true for HFmode.
* match.pd: Simplify (_Float16) ceil ((double) x) to
__builtin_ceilf16 (a) when a is _Float16 type and
direct_internal_fn_supported_p.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr102464.c: New test.
gcc/config/i386/i386.c
gcc/match.pd
gcc/testsuite/gcc.target/i386/pr102464.c [new file with mode: 0644]