On Thursday, September 2, 2021, Iain Sandoe <idsan...@googlemail.com> wrote:
> Hi Hongtao. > > > On 2 Sep 2021, at 07:06, Hongtao Liu via Gcc-patches < > gcc-patches@gcc.gnu.org> wrote: > > > > I'm going to check in the first 3 patches which are already approved. > > > > Update hf soft-fp from glibc. > > [i386] Enable _Float16 type for TARGET_SSE2 and above. > > [i386] libgcc: Enable hfmode soft-sf/df/xf/tf extensions and > > truncations. > > Bootstrap on Darwin x86_64 is broken on at least AVX512 and i5 cpus at > revision > r12-3311-g1e6267b33526. > > "fp-machine.h:81:22: error: unknown type name 'TFtype'; did you mean > 'HFtype’?” > > any immediate ideas on what might be the issue? > thanks Seems to be related to the belowpart which is not changed by my patch, and TFtype is defined in quad.h 76 <https://gcc.gnu.org/git?p=gcc.git;a=blob;f=libgcc/config/i386/sfp-machine.h;h=f15d29d37550936c060c4caed4182c58c43ee221;hb=f15d29d37550936c060c4caed4182c58c43ee221#l76> /* Define ALIASNAME as a strong alias for NAME. */ 77 <https://gcc.gnu.org/git?p=gcc.git;a=blob;f=libgcc/config/i386/sfp-machine.h;h=f15d29d37550936c060c4caed4182c58c43ee221;hb=f15d29d37550936c060c4caed4182c58c43ee221#l77> #if defined __MACH__ 78 <https://gcc.gnu.org/git?p=gcc.git;a=blob;f=libgcc/config/i386/sfp-machine.h;h=f15d29d37550936c060c4caed4182c58c43ee221;hb=f15d29d37550936c060c4caed4182c58c43ee221#l78> /* Mach-O doesn't support aliasing. If these functions ever return 79 <https://gcc.gnu.org/git?p=gcc.git;a=blob;f=libgcc/config/i386/sfp-machine.h;h=f15d29d37550936c060c4caed4182c58c43ee221;hb=f15d29d37550936c060c4caed4182c58c43ee221#l79> anything but CMPtype we need to revisit this... */ 80 <https://gcc.gnu.org/git?p=gcc.git;a=blob;f=libgcc/config/i386/sfp-machine.h;h=f15d29d37550936c060c4caed4182c58c43ee221;hb=f15d29d37550936c060c4caed4182c58c43ee221#l80> #define strong_alias(name, aliasname) \ 81 <https://gcc.gnu.org/git?p=gcc.git;a=blob;f=libgcc/config/i386/sfp-machine.h;h=f15d29d37550936c060c4caed4182c58c43ee221;hb=f15d29d37550936c060c4caed4182c58c43ee221#l81> CMPtype aliasname (TFtype a, TFtype b) { return name(a, b); } 82 <https://gcc.gnu.org/git?p=gcc.git;a=blob;f=libgcc/config/i386/sfp-machine.h;h=f15d29d37550936c060c4caed4182c58c43ee221;hb=f15d29d37550936c060c4caed4182c58c43ee221#l82> #else Would you try to add typedef float TFtype __attribute__ ((mode (TF))); Here to see if it fixes the issue. Iain > > > > > > On Mon, Aug 2, 2021 at 2:31 PM liuhongt <hongtao....@intel.com> wrote: > >> > >> Update from v2: > >> > >> 1. Support -fexcess-precision=16 which will enable > >> FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 when backend supports _Float16. > >> 2. Update ix86_get_excess_precision, so -fexcess-precision=standard > >> should not do anything different from -fexcess-precision=fast > >> regarding _Float16. > >> 3. Avoiding macroization of HFmode patterns. > >> 4. Allow (subreg:SI (reg:HF)). > >> 5. Update documents corresponding exactly to the code changes in > >> the same patch. > >> 6. According to 32bit abi, pass vector _Float16 by sse registers > >> for 32-bit mode, not stack. > >> > >> Guo, Xuepeng (1): > >> AVX512FP16: Initial support for AVX512FP16 feature and scalar _Float16 > >> instructions. > >> > >> liuhongt (5): > >> Update hf soft-fp from glibc. > >> [i386] Enable _Float16 type for TARGET_SSE2 and above. > >> [i386] libgcc: Enable hfmode soft-sf/df/xf/tf extensions and > >> truncations. > >> Support -fexcess-precision=16 which will enable > >> FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 when backend supports _Float16. > >> AVX512FP16: Support vector init/broadcast/set/extract for FP16. > >> > >> gcc/ada/gcc-interface/misc.c | 3 + > >> gcc/c-family/c-common.c | 6 +- > >> gcc/c-family/c-cppbuiltin.c | 6 +- > >> gcc/common.opt | 5 +- > >> gcc/common/config/i386/cpuinfo.h | 2 + > >> gcc/common/config/i386/i386-common.c | 26 +- > >> gcc/common/config/i386/i386-cpuinfo.h | 1 + > >> gcc/common/config/i386/i386-isas.h | 1 + > >> gcc/config.gcc | 2 +- > >> gcc/config/aarch64/aarch64.c | 1 + > >> gcc/config/arm/arm.c | 1 + > >> gcc/config/i386/avx512fp16intrin.h | 225 ++++++++++ > >> gcc/config/i386/cpuid.h | 1 + > >> gcc/config/i386/i386-builtin-types.def | 7 +- > >> gcc/config/i386/i386-builtins.c | 23 + > >> gcc/config/i386/i386-c.c | 2 + > >> gcc/config/i386/i386-expand.c | 129 +++++- > >> gcc/config/i386/i386-isa.def | 1 + > >> gcc/config/i386/i386-modes.def | 13 +- > >> gcc/config/i386/i386-options.c | 4 +- > >> gcc/config/i386/i386.c | 243 +++++++++-- > >> gcc/config/i386/i386.h | 29 +- > >> gcc/config/i386/i386.md | 291 ++++++++++++- > >> gcc/config/i386/i386.opt | 4 + > >> gcc/config/i386/immintrin.h | 4 + > >> gcc/config/i386/sse.md | 397 +++++++++++++----- > >> gcc/config/m68k/m68k.c | 2 + > >> gcc/config/s390/s390.c | 2 + > >> gcc/coretypes.h | 3 +- > >> gcc/doc/extend.texi | 22 + > >> gcc/doc/invoke.texi | 10 +- > >> gcc/doc/tm.texi | 14 +- > >> gcc/doc/tm.texi.in | 3 + > >> gcc/emit-rtl.c | 5 + > >> gcc/flag-types.h | 3 +- > >> gcc/fortran/options.c | 3 + > >> gcc/lto/lto-lang.c | 3 + > >> gcc/target.def | 11 +- > >> gcc/testsuite/g++.dg/other/i386-2.C | 2 +- > >> gcc/testsuite/g++.dg/other/i386-3.C | 2 +- > >> gcc/testsuite/g++.target/i386/float16-1.C | 8 + > >> gcc/testsuite/g++.target/i386/float16-2.C | 14 + > >> gcc/testsuite/g++.target/i386/float16-3.C | 10 + > >> gcc/testsuite/gcc.target/i386/avx-1.c | 2 +- > >> gcc/testsuite/gcc.target/i386/avx-2.c | 2 +- > >> gcc/testsuite/gcc.target/i386/avx512-check.h | 3 + > >> .../gcc.target/i386/avx512fp16-12a.c | 21 + > >> .../gcc.target/i386/avx512fp16-12b.c | 27 ++ > >> gcc/testsuite/gcc.target/i386/float16-3a.c | 10 + > >> gcc/testsuite/gcc.target/i386/float16-3b.c | 10 + > >> gcc/testsuite/gcc.target/i386/float16-4a.c | 10 + > >> gcc/testsuite/gcc.target/i386/float16-4b.c | 10 + > >> gcc/testsuite/gcc.target/i386/float16-5.c | 12 + > >> gcc/testsuite/gcc.target/i386/float16-6.c | 8 + > >> gcc/testsuite/gcc.target/i386/funcspec-56.inc | 2 + > >> gcc/testsuite/gcc.target/i386/pr54855-12.c | 14 + > >> gcc/testsuite/gcc.target/i386/sse-13.c | 2 +- > >> gcc/testsuite/gcc.target/i386/sse-14.c | 2 +- > >> gcc/testsuite/gcc.target/i386/sse-22.c | 4 +- > >> gcc/testsuite/gcc.target/i386/sse-23.c | 2 +- > >> .../gcc.target/i386/sse2-float16-1.c | 8 + > >> .../gcc.target/i386/sse2-float16-2.c | 16 + > >> .../gcc.target/i386/sse2-float16-3.c | 12 + > >> gcc/testsuite/lib/target-supports.exp | 13 +- > >> gcc/tree.c | 3 +- > >> libgcc/config.host | 5 +- > >> libgcc/config/i386/32/sfp-machine.h | 1 + > >> libgcc/config/i386/32/t-softfp | 1 + > >> libgcc/config/i386/64/sfp-machine.h | 1 + > >> libgcc/config/i386/64/t-softfp | 1 + > >> libgcc/config/i386/sfp-machine.h | 1 + > >> libgcc/config/i386/t-softfp | 5 + > >> libgcc/soft-fp/eqhf2.c | 49 +++ > >> libgcc/soft-fp/extendhfdf2.c | 53 +++ > >> libgcc/soft-fp/extendhfsf2.c | 49 +++ > >> libgcc/soft-fp/half.h | 1 + > >> libgcc/soft-fp/truncdfhf2.c | 52 +++ > >> libgcc/soft-fp/truncsfhf2.c | 48 +++ > >> 78 files changed, 1781 insertions(+), 223 deletions(-) > >> create mode 100644 gcc/config/i386/avx512fp16intrin.h > >> create mode 100644 gcc/testsuite/g++.target/i386/float16-1.C > >> create mode 100644 gcc/testsuite/g++.target/i386/float16-2.C > >> create mode 100644 gcc/testsuite/g++.target/i386/float16-3.C > >> create mode 100644 gcc/testsuite/gcc.target/i386/avx512fp16-12a.c > >> create mode 100644 gcc/testsuite/gcc.target/i386/avx512fp16-12b.c > >> create mode 100644 gcc/testsuite/gcc.target/i386/float16-3a.c > >> create mode 100644 gcc/testsuite/gcc.target/i386/float16-3b.c > >> create mode 100644 gcc/testsuite/gcc.target/i386/float16-4a.c > >> create mode 100644 gcc/testsuite/gcc.target/i386/float16-4b.c > >> create mode 100644 gcc/testsuite/gcc.target/i386/float16-5.c > >> create mode 100644 gcc/testsuite/gcc.target/i386/float16-6.c > >> create mode 100644 gcc/testsuite/gcc.target/i386/pr54855-12.c > >> create mode 100644 gcc/testsuite/gcc.target/i386/sse2-float16-1.c > >> create mode 100644 gcc/testsuite/gcc.target/i386/sse2-float16-2.c > >> create mode 100644 gcc/testsuite/gcc.target/i386/sse2-float16-3.c > >> create mode 100644 libgcc/config/i386/64/t-softfp > >> create mode 100644 libgcc/soft-fp/eqhf2.c > >> create mode 100644 libgcc/soft-fp/extendhfdf2.c > >> create mode 100644 libgcc/soft-fp/extendhfsf2.c > >> create mode 100644 libgcc/soft-fp/truncdfhf2.c > >> create mode 100644 libgcc/soft-fp/truncsfhf2.c > >> > >> -- > >> 2.27.0 > >> > > > > > > -- > > BR, > > Hongtao > > -- BR, Hongtao