From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by sourceware.org (Postfix) with ESMTPS id 8BC15383D830 for ; Thu, 12 Aug 2021 19:21:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8BC15383D830 Received: by mail-qv1-xf32.google.com with SMTP id g6so3792741qvj.8 for ; Thu, 12 Aug 2021 12:21:43 -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:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=LKYxwopEHbB+ux1wtzCQXsWNP28v0QOEgLq4m1pbkCg=; b=EsJVp/m07XEDWr1tVquCtdhSZg3RwbJaBwywN/Uyc8uowaGtzEqjYvewtd8JXJcHv8 /s1O/G5oatofykvc7HOlnILPgCyfIZo/vnq5J0cmlzusHaWwTSy95e+iIADqm4rTgYLN Vesk6vm8rYaDMFKQwPkT34FAeg0MuZSao0kE/nt6GwaZ5NdF6UdgQHJxEzniLfq3x8fk DeopRab4wPyX9wyCpdkpnOS3thcB/Uqr7YMPb8wZsgsE3VR2GDOHGAIByVdDIgXb4L+6 qn4G4WKo8vVntA6H3zvcKWP/ZYnB6MOkQrx9koCb16GWpbvX7BJStSwcw1Ksr/RiQXUi OBFA== X-Gm-Message-State: AOAM531EFwGG/3pRCF6boYX8Yqb7i5mNDBFjj49arBz6d4wtn0rY74qz 79RKBVWdCpo+auwBw4+Xame2TvLfbpYCMbzMGxk= X-Google-Smtp-Source: ABdhPJy+5JQ6TgT7GYY2irv+/2QP0QJEq75SxsBa1VH3ZfMt8XjULfC2SDFyBAMSHCtLljuYBZL8Oo+OilpkfyymHKc= X-Received: by 2002:a0c:c186:: with SMTP id n6mr5611834qvh.4.1628796103016; Thu, 12 Aug 2021 12:21:43 -0700 (PDT) MIME-Version: 1.0 References: <20210810121315.3409758-1-hongtao.liu@intel.com> In-Reply-To: From: Uros Bizjak Date: Thu, 12 Aug 2021 21:21:31 +0200 Message-ID: Subject: Re: [PATCH] Extend ldexp{s, d}f3 to vscalefs{s, d} when TARGET_AVX512F and TARGET_SSE_MATH. To: Hongtao Liu Cc: liuhongt , "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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, 12 Aug 2021 19:21:53 -0000 On Thu, Aug 12, 2021 at 6:40 AM Hongtao Liu wrote: > > > > Hi: > > > > AVX512F supported vscalefs{s,d} which is the same as ldexp except= the second operand should be floating point. > > > > Bootstrapped and regtested on x86_64-linux-gnu{-m32,}. > > > > > > > > gcc/ChangeLog: > > > > > > > > PR target/98309 > > > > * config/i386/i386.md (ldexp3): Extend to vscalefs[sd= ] > > > > when TARGET_AVX512F and TARGET_SSE_MATH. > > > > > > > > gcc/testsuite/ChangeLog: > > > > > > > > PR target/98309 > > > > * gcc.target/i386/pr98309-1.c: New test. > > > > * gcc.target/i386/pr98309-2.c: New test. > > > > > > OK. > > > > Actually, we should introduce a scalar version of avx512f_vmscalef, so > > we can avoid all subreg conversions with the vector-merge (VM) > > version, and will also allow memory in operand 2. > > > > Please test the attached incremental patch. > > > Bootstrapped and regtested on x86_64-linux-gnu{-m32,} on CLX. > tests is fine. Thanks, committed with the following ChangeLog: [i386] Introduce scalar version of avx512f_vmscalef. 2021-08-12 Uro=C5=A1 Bizjak gcc/ PR target/98309 * config/i386/i386.md (avx512f_scalef2): New insn pattern. (ldexp3): Use avx512f_scalef2. (UNSPEC_SCALEF): Move from ... * config/i386/sse.md (UNSPEC_SCALEF): ... here. Uros.