From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) by sourceware.org (Postfix) with ESMTPS id 55032385803C for ; Mon, 11 Oct 2021 02:32:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 55032385803C Received: by mail-vk1-xa2a.google.com with SMTP id bb12so4791435vkb.5 for ; Sun, 10 Oct 2021 19:32:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=kx3LV/A7Xd2/WReJsEJxII/+M0BDjyTJ86XDjambBDM=; b=RPb3YH1STmAgW6OPc56qC931B25ky8zfBuKYVaME0lbK36TaKAejtY4tsCrUjMcYnt IyUWjA0+gHHMuHusdZO0Q7sdrGxvbTOsK6nhvD7215OJOW1g7fWZUSSR4k8S0fZW2voS PRCK3csTQup4JN5hk+X5Vurv9bhz/Vd7p6LsvyyF9lX3WkAAbv74cajDUcTaXVqJC5v7 SE925zlYv/c6FSoioTTLst3A7ROPOe6GemVa1/Nh/m9uQdGiP+k39fuI5lIVwGqzjEG6 TX5Kdx7FdSSvzW0V975eO8c1su1MxY0b2B4SYiUyf3vy50xnssB8Ng1y3+SpG9k37DPM qLRg== X-Gm-Message-State: AOAM5337ffuDcX2QrSk+CsTLhbmQWqSky5S8hqUIU2e/XsgRfspfEWkn VbuT8yy3UZYhILZXD93VILXXwgrGCU+B7AFxfBI= X-Google-Smtp-Source: ABdhPJyarfmZ/pdWKyuNtv3eHSW5BlE7cY3io3S6LO4FrFAdi8J8j3hLPeNVeWVnoZhd+YqqcNjRK9mg5LC+wsTNx7o= X-Received: by 2002:a05:6122:17a4:: with SMTP id o36mr1067260vkf.0.1633919546849; Sun, 10 Oct 2021 19:32:26 -0700 (PDT) MIME-Version: 1.0 References: <20211011021047.66652-1-hongtao.liu@intel.com> <9b2e2338-ed4e-8b20-632d-e8d5f5df1af0@linux.ibm.com> In-Reply-To: <9b2e2338-ed4e-8b20-632d-e8d5f5df1af0@linux.ibm.com> From: Hongtao Liu Date: Mon, 11 Oct 2021 10:39:00 +0800 Message-ID: Subject: Re: [PATCH] Adjust testcase for O2 vectorization enabling To: "Kewen.Lin" Cc: Hongtao Liu , GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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, 11 Oct 2021 02:32:28 -0000 On Mon, Oct 11, 2021 at 10:23 AM Kewen.Lin via Gcc-patches wrote: > > Hi Hongtao, > > on 2021/10/11 =E4=B8=8A=E5=8D=8810:10, liuhongt via Gcc-patches wrote: > > libgomp/ChangeLog: > > > > * testsuite/libgomp.graphite/force-parallel-8.c: Add -fno-tree-ve= ctorize. > > --- > > libgomp/testsuite/libgomp.graphite/force-parallel-8.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libgomp/testsuite/libgomp.graphite/force-parallel-8.c b/li= bgomp/testsuite/libgomp.graphite/force-parallel-8.c > > index f9e07039172..0f3d138cebd 100644 > > --- a/libgomp/testsuite/libgomp.graphite/force-parallel-8.c > > +++ b/libgomp/testsuite/libgomp.graphite/force-parallel-8.c > > @@ -1,4 +1,4 @@ > > -/* { dg-additional-options "-fdisable-tree-thread1 -fdisable-tree-vrp-= thread1" } */ > > +/* { dg-additional-options "-fdisable-tree-thread1 -fdisable-tree-vrp-= thread1 -fno-tree-vectorize" } */ > > > > #define N 1500 > > > > > > Thanks for doing this! > > This issue was observed in rs6000 specific PR102658 as well. > > I've looked into it a bit, it's caused by the "conditional store replacem= ent" which > is originally disabled without vectorization as below code. > > /* If either vectorization or if-conversion is disabled then do > not sink any stores. */ > if (param_max_stores_to_sink =3D=3D 0 > || (!flag_tree_loop_vectorize && !flag_tree_slp_vectorize) > || !flag_tree_loop_if_convert) > return false; > > The new change makes the innermost loop look like > > for (int c1 =3D 0; c1 <=3D 1499; c1 +=3D 1) { > if (c1 <=3D 500) { > S_10(c0, c1); > } else { > S_9(c0, c1); > } > S_11(c0, c1); > } > > and can not be splitted as: > > for (int c1 =3D 0; c1 <=3D 500; c1 +=3D 1) > S_10(c0, c1); > > for (int c1 =3D 501; c1 <=3D 1499; c1 +=3D 1) > S_9(c0, c1); > > So instead of disabling vectorization, could we just disable this cs repl= acement > with parameter "--param max-stores-to-sink=3D0"? > > I tested this proposal on ppc64le, it should work as well. > > What do you think of it? I can confirm it also works for x86, I'll adjust the patch. Thank you for the analysis. > > BR, > Kewen --=20 BR, Hongtao