From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by sourceware.org (Postfix) with ESMTPS id 392943858CD1 for ; Fri, 14 Jul 2023 10:10:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 392943858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-51cff235226so3498480a12.0 for ; Fri, 14 Jul 2023 03:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689329436; x=1691921436; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AyIukJhfCp1OBB0vcfzp0uX+qV6fc60wyU17Siqop0I=; b=G2zHuFvi0tvgpwzHBFH5XS9L/wyocXIRCDGniWH69H7UFQfnIxdEJheeU2ZrbqTx53 u+0p5HwdSvCqJ8x0mtqrjnevyNYb7aSsbK8jeo4tnQjaDxYAnzA+m5xa9upTGh/QdMF7 T/24S69tYrnBNUEGKOtcH353Ykio/w6NSYXFneCbR2BYjxxyE65kyhhiOR9LKqxgKS3S a5+xSQSZS97x/BwCTaKtvzatg5jEgl2v/CB2++At2Lp7fuhF9yaj6OKebpoESNMdr44V SJEXJt9b7NafVX3uzvlz2D3yB0V+MCdMexjuN7udOtvuyWpHmprmsoq/uFxsVRjO9FUH nY+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689329436; x=1691921436; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AyIukJhfCp1OBB0vcfzp0uX+qV6fc60wyU17Siqop0I=; b=fHM0h1GEQwAvWbiIhuOfo3VSOI4JL1C2CpibeSCFEDXmtu1X4GP+MDE34sCsZpNySi JqjcWXEs1kWfEuURRJ3zhO2NihZBTqjtoJqJMMMzydV7xdhDEEwnPg0D4PJA8NEwEX5R 96TdWuzKSvjukqgLcV278qvuT3EOprNBRX2pjQPduPFl2Bu4dnAt1yt+Hg4xouxGysG4 LNGoUwAJbt7307zq4K+WXJmjm3VUlgSq/VWJF2QzLP+/dkHsqIShPDW5j7g9wsIdgAx7 pnkaK04fAgJP57RuIpKY0ff7mtemrrdgm45vC7UCdMO1M0XTj76txX/7outnROD6QUDU HIAA== X-Gm-Message-State: ABy/qLazBj/+YJ1e8qXDGKaIjEQlH++U170xYch4HKwPd+fKQdwtw26L YIk6IBBy+PBNamikmci7x58JiKKZw7jZtLU+iUE= X-Google-Smtp-Source: APBJJlE6e9mtSqDNU/h131YVyAEx4d/LVCBJTIPoZqxfmWJHRYFoc/bOpG9q/tqBgWY16u2gKUjxvYYcu0T0LoWk9Ow= X-Received: by 2002:a50:e608:0:b0:51d:f0fd:bc80 with SMTP id y8-20020a50e608000000b0051df0fdbc80mr2993567edm.17.1689329435712; Fri, 14 Jul 2023 03:10:35 -0700 (PDT) MIME-Version: 1.0 References: <28de2fc1-79e6-6fef-400c-2991b25d13e1@suse.com> In-Reply-To: <28de2fc1-79e6-6fef-400c-2991b25d13e1@suse.com> From: Uros Bizjak Date: Fri, 14 Jul 2023 12:10:23 +0200 Message-ID: Subject: Re: [PATCH] x86: replace "extendhfdf2" expander To: Jan Beulich Cc: "gcc-patches@gcc.gnu.org" , Hongtao Liu , Kirill Yukhin , Jan Hubicka Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Jul 14, 2023 at 11:44=E2=80=AFAM Jan Beulich wr= ote: > > The corresponding insn serves this purpose quite fine, and leads to > slightly less (generated) code. All we need is the insn to not have a > leading * in its name, while retaining that * for "extendhfsf2". > Introduce a mode attribute in exchange to achieve that. > > gcc/ > > * config/i386/i386.md (extendhfdf2): Delete expander. > (extendhf): New mode attribute. > (*extendhf2): Use it. No, please leave the expander, it is there due to extendhfsf2 that prevents effective macroization. FYI, there is no less generated code when the named pattern is used, the same code is generated from the named pattern as from the expander. Source code can be shrinked, but in this particular case, forced macroization complicates things more. Uros. > --- > Of course the mode attribute could as well supply the full names. > > --- a/gcc/config/i386/i386.md > +++ b/gcc/config/i386/i386.md > @@ -5221,13 +5221,9 @@ > } > }) > > -(define_expand "extendhfdf2" > - [(set (match_operand:DF 0 "register_operand") > - (float_extend:DF > - (match_operand:HF 1 "nonimmediate_operand")))] > - "TARGET_AVX512FP16") > +(define_mode_attr extendhf [(SF "*") (DF "")]) > > -(define_insn "*extendhf2" > +(define_insn "extendhf2" > [(set (match_operand:MODEF 0 "register_operand" "=3Dv") > (float_extend:MODEF > (match_operand:HF 1 "nonimmediate_operand" "vm")))]