From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92f.google.com (mail-ua1-x92f.google.com [IPv6:2607:f8b0:4864:20::92f]) by sourceware.org (Postfix) with ESMTPS id 1BFA5385843B for ; Thu, 2 Sep 2021 15:18:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1BFA5385843B Received: by mail-ua1-x92f.google.com with SMTP id x21so1097812uan.6 for ; Thu, 02 Sep 2021 08:18:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mUeSQTXrRUfZ81HZ6BFv9L3TlG54QS2UySzHuTmX92M=; b=VGlLtZWf20lUB/x+bqOh+Ysmi4ALPrFJfzlGRPKq0Q68J39vvisnYIvKpSCmKXZDFG XvU0rcd3rI0MuQMHL4cm6v32LZGLGj2L8W2C+PAsVibjlDY02MuM2PjCPGFA09Iezo9w L8jnzRutoFLYtJfdOR1xmdCltyOSWCrLns2HYOtNOrG0fmhDtpGk3zobFrArcaEeM+Zm IC9xePcHT+lDdlcGSpEvLMr8AwV3RTiQ3Ub7V9t6tNn/pKBpbKa2ICUpbbpZF0ppceSh jRIT0lSoYv9TudXHQ8djcZ6b0LnrqBpMNSI9r+dMGZyxcbXz3gsk1Hlgd9NRosjcagAD uIJA== X-Gm-Message-State: AOAM530j8d8cqxcXepr9al2pPKgtri5zsZ0j/93xhNPeZMA+Il3AYCAV +88OI6pbyyLcM4SHU46XyDA7ZDaNreDtdlFtZcrf5BprtrQ= X-Google-Smtp-Source: ABdhPJzJ9EytNrS1iOzcKkixHjLISMvEMAC2ifGPZ2FNu8LHPpllS4jkzM4qSZdKY4dG7zvpJQUXvoJTvcj5pUTCXGg= X-Received: by 2002:ab0:7581:: with SMTP id q1mr2199898uap.63.1630595909187; Thu, 02 Sep 2021 08:18:29 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a59:9986:0:b0:217:801f:bafe with HTTP; Thu, 2 Sep 2021 08:18:28 -0700 (PDT) In-Reply-To: References: <20210802063116.999830-1-hongtao.liu@intel.com> From: Hongtao Liu Date: Thu, 2 Sep 2021 23:18:28 +0800 Message-ID: Subject: [PATCH V3 0/6] Initial support for AVX512FP16 To: Iain Sandoe Cc: liuhongt , GCC Patches , Joseph Myers X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, HTML_OBFUSCATE_05_10, KAM_LOTSOFHASH, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 15:18:42 -0000 On Thursday, September 2, 2021, Iain Sandoe 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=E2=80=99?=E2=80=9D > > 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 /* Define ALIASNAME as a strong alias for NAME. */ 77 #if defined __MACH__ 78 /* Mach-O doesn't support aliasing. If these functions ever return 79 anything but CMPtype we need to revisit this... */ 80 #define strong_alias(name, aliasname) \ 81 CMPtype aliasname (TFtype a, TFtype b) { return name(a, b); } 82 #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 wrote: > >> > >> Update from v2: > >> > >> 1. Support -fexcess-precision=3D16 which will enable > >> FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 when backend supports _Float16. > >> 2. Update ix86_get_excess_precision, so -fexcess-precision=3Dstandard > >> should not do anything different from -fexcess-precision=3Dfast > >> 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 _Float1= 6 > >> 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=3D16 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 > > --=20 BR, Hongtao