From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id 6B4333858C56 for ; Thu, 13 Oct 2022 11:11:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6B4333858C56 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-x52d.google.com with SMTP id l22so2103456edj.5 for ; Thu, 13 Oct 2022 04:11:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=2AdOBJ28+bi7alNZzofeVcJa5EZ7TwEIH32OCB14lvo=; b=lyPIYFrk3esxKFUzYAgHheQ8IjNJtAI8D35RielDwt1qLqHm1hKZTkX02O6zXsAfO6 i0zrrRVI/W+FRPTMpLiC6Rcbk6jLeDNx3Tkcf2U8oeZkadGqR3l0e50gw02rhCO+tVoe y659cbQNlnvNLjVvKXbUiLKZpBkwnPng2jKYf5l3XvMGkYhtLZuK/VGik/8bKpDlMh8h 8DbMxndZ4qzx+UQB+Mvr9FZwdqKHIY8WuHkVW2kJYzye1SDz6FsrDivNNCUdv3pm6WNQ NKt+i/eQ3Z5Hzpg62Y7WwUdEKJ2WsFXN/8jm3Y2lE1PivgtKuyB4jGUAx2t3uzrhBR53 s7jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=2AdOBJ28+bi7alNZzofeVcJa5EZ7TwEIH32OCB14lvo=; b=H57QyUcHipz/KhdiFGgZxWGfgMFzx+KaaqIbXB2HCPJHjt02qJ9zGDRzLa8/3iDurQ NgXsBZHUNmvGRju4Cb7jICrf8beSUVo4JZQBEJbWmzDdjSU2hCDNpKfkQKFGAbUNmVtM j6d5gp0KMZq7u3QiZZuN4cHKL3M74mQMjigaTDLlWmvzwS++X2L/xzEwU1DNlKUwfKvT Z/uZoXUaEON2/UCZF+y3TsHbWkiIg1kXlMrh1ByjfpKHbKdY5cj5ABSWzFreEIC/Iq6f ayQYs0PrQrXXru/by2EI115M7CUjhT59kC5Z3SlXsZuVS7VGe6XQMGlYTmcmHEAyrjX4 ZreA== X-Gm-Message-State: ACrzQf3yWcxUe/hLgSYNu+Gz0Uofp3q6LncUqcq76v4BdRWFijgmt8iZ sYwvGH8AOp26bdSlMymTObdXQWIi886/kcaKk4g= X-Google-Smtp-Source: AMsMyM7WqROQ1yK6w8XAhIVhaVm+RB5CH+PjQ1MEQp1gLnQ0x/Z8iGtrvObQCasfMuF21D4QDWThdCu+p7h8oFlmnCE= X-Received: by 2002:aa7:df16:0:b0:45b:f51f:ab73 with SMTP id c22-20020aa7df16000000b0045bf51fab73mr21684222edy.366.1665659465059; Thu, 13 Oct 2022 04:11:05 -0700 (PDT) MIME-Version: 1.0 References: <4D15AD37-C11D-4CDD-BFB1-37E1ECF0A0D5@levyhsu.com> <26e1323e4a0395fbd1bc71b8f7a3f016fa6df54b.camel@xry111.site> In-Reply-To: From: Richard Biener Date: Thu, 13 Oct 2022 13:10:52 +0200 Message-ID: Subject: Re: [PATCH] Optimize nested permutation to single VEC_PERM_EXPR [PR54346] To: Lulu Cheng Cc: Xi Ruoyao , Levy , wilson@tuliptree.org, gcc-patches@gcc.gnu.org, Liwei Xu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Oct 13, 2022 at 10:16 AM Lulu Cheng wrote: > > > =E5=9C=A8 2022/10/13 =E4=B8=8B=E5=8D=882:44, Xi Ruoyao =E5=86=99=E9=81=93= : > > On Thu, 2022-10-13 at 14:15 +0800, Levy wrote: > >> Hi RuoYao > >> > >> It=E2=80=99s probably because loongarch64 doesn=E2=80=99t support > >> can_vec_perm_const_p(result_mode, op_mode, sel2, false) > >> > >> I=E2=80=99m not sure whether if loongarch will support it or should I = just > >> limit the test target for pr54346.c? > > I'm not sure if we can add TARGET_VECTORIZE_VEC_PERM_CONST when we don'= t > > actually support vector. (LoongArch has SIMD instructions but the > > support in GCC won't be added in a very recent future.) > > > If what I understand is correct, I think this might be a better solution. > > /* { dg-do compile } */ > > +/* { dg-require-effective-target vect_perm } */ > /* { dg-options "-O -fdump-tree-dse1" } */ Btw, what forwprop does is check whether any of the original permutations a= re not supported and then elide the supportability check for the result. The reasoning is that the original permute(s) would be lowered during vectlower so we can= as well do that for the result. We should just never turn a supported permuta= tion sequence into a not supported one. Richard. >