From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) by sourceware.org (Postfix) with ESMTPS id 15FF13899008 for ; Mon, 16 Aug 2021 07:19:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 15FF13899008 Received: by mail-vs1-xe31.google.com with SMTP id f13so1962174vsl.13 for ; Mon, 16 Aug 2021 00:19:24 -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; bh=LofWyjjN/dazFboRAwBol7yk0ylDddPKBWu7xFVOUn8=; b=Qr65osQ7N+C2R5DbDPGH3ep7wAyx5jFOSaimX7QYBFU0xAXPH6P7eW5OCnQRKsVS1V gTjT1yT76O3irsrwkRDLEORYSEEBe/eP0/cCwx0uVdmttEeln2yeU4aOOieOcjI+DD2W LEu7pQgDI+/mmcrcAEb7LsXc0ElDHYQSpKVJXH4U2YAavK56xM56+FhuiSiEOpuH/yGA oGKDjP+9oghnraAKxy4uUETGIQkR9mdXSKKTTwqoNzkQFGsAKorIMvrIEKIAQMx+seX8 UPauIaZcWGLyDKZjXrtYa4O5/umLHPI1mD+UOuWEt0OvIxGrwV9nahjhUx/oWW9pQqyp HsbQ== X-Gm-Message-State: AOAM532oN7ciAvINxGUavYx1pqInN/6uH/GibHlZEeoJ5ySEkmk/KFzP xBSFts8HcRQHfTE9N7o2Lbgcln9MFy1y0DJ1HpM= X-Google-Smtp-Source: ABdhPJzKFe6eflpqxx3cuMu7cFhyySyZ72YU03iLiB0uLCS5Wx2goJgutAsXEbhTMbIKYPNewvo9oD8FLUwZlc32qFk= X-Received: by 2002:a67:ee4c:: with SMTP id g12mr2207171vsp.45.1629098363723; Mon, 16 Aug 2021 00:19:23 -0700 (PDT) MIME-Version: 1.0 References: <20210813084753.GG2380545@tucnak> <20210816051838.868413-1-hongtao.liu@intel.com> <20210816071034.GS2380545@tucnak> In-Reply-To: <20210816071034.GS2380545@tucnak> From: Hongtao Liu Date: Mon, 16 Aug 2021 15:25:07 +0800 Message-ID: Subject: Re: [PATCH] [i386] Optimize __builtin_shuffle_vector. To: Jakub Jelinek Cc: liuhongt , GCC Patches , jakub@rehat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.5 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 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: Mon, 16 Aug 2021 07:19:25 -0000 On Mon, Aug 16, 2021 at 3:11 PM Jakub Jelinek via Gcc-patches wrote: > > On Mon, Aug 16, 2021 at 01:18:38PM +0800, liuhongt via Gcc-patches wrote: > > + /* Accept VNxHImode and VNxQImode now. */ > > + if (!TARGET_AVX512VL && GET_MODE_SIZE (mode) < 64) > > + return false; > > + > > + /* vpermw. */ > > + if (!TARGET_AVX512BW && inner_size == 2) > > + return false; > > + > > + /* vpermb. */ > > Too many spaces after dot. > > > @@ -18301,7 +18380,7 @@ expand_vec_perm_1 (struct expand_vec_perm_d *d) > > if (expand_vec_perm_palignr (d, true)) > > return true; > > > > - /* Try the AVX512F vperm{s,d} instructions. */ > > + /* Try the AVX512F vperm{w,b,s,d} and instructions */ > > What is the " and" doing there? Typo. > > > + /* Check that the permutation is suitable for pmovz{bw,wd,dq}. > > + For example V16HImode to V8HImode > > + { 0 2 4 6 8 10 12 14 * * * * * * * * }. */ > > + for (int i = 0; i != nelt/2; i++) > > nelt / 2 please > > Otherwise LGTM. > Thanks for the review. > Jakub > -- BR, Hongtao