From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by sourceware.org (Postfix) with ESMTPS id E1BF83858C60 for ; Fri, 15 Oct 2021 15:37:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E1BF83858C60 Received: by mail-qk1-x729.google.com with SMTP id h20so4382341qko.13 for ; Fri, 15 Oct 2021 08:37:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bWlZDpUVXxazUifYklNokSY/jqEr2OIgNIGRH6axgNk=; b=AMUf75WErjg+TwbDfSvsjO3ut3nZ+l+Ldz+zPNQOwp8X2eRsfxtqvDK7gFqLtYk9QH IvUQq3aHhIz/73yzV3/EroIdRafeHZk/byw1sjWP1FbsIoVOmg6qnMTXQUjtp4wSgw5X 3eEJNjkPDCE5cT1KBh8vK6EfJAX1bMm5iO90NejUULuuleZaVlrHxLPt0HpRRMdtWFLG f8+DuQiiHUbLOeEKxyDUqtZyGQEqR/3Ya9Kw2YVxjvFUOD1bGISLNwCBaDG/fsM/LCd/ CA10TrOlA8obhcJNRE2FEi2leubFakfJaqYOEMiCi+qEwJWTQhH2ZxBTg82KZgN0tGuH sMBQ== X-Gm-Message-State: AOAM530L6RruyqQIJuJo4vPH0heBr2eD0EacyELzgqG0VAyGzvanqLT+ JaxngL3Br/CaAUqeKslsbtjjsfRmnVQ= X-Google-Smtp-Source: ABdhPJzWvGLy4CQm1W3PQYl7r+jc37UxQnBSlhGunJAk5EpmCpptG+RXF7TO+1A3YQ4E1pbyvQu7Qg== X-Received: by 2002:a37:b7c1:: with SMTP id h184mr10160583qkf.65.1634312227447; Fri, 15 Oct 2021 08:37:07 -0700 (PDT) Received: from [192.168.0.41] (184-96-250-116.hlrn.qwest.net. [184.96.250.116]) by smtp.gmail.com with ESMTPSA id bp40sm1632975qkb.114.2021.10.15.08.37.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Oct 2021 08:37:07 -0700 (PDT) Subject: Re: [PATCH] Adjust testcase for O2 vectorization. To: liuhongt , gcc-patches@gcc.gnu.org References: <8e9d69e6-b31e-2521-ec6a-8231781b4d4f@linux.ibm.com> <20211014071141.71871-1-hongtao.liu@intel.com> From: Martin Sebor Message-ID: <61ff5da7-a7af-40b6-85cc-fa230da6a33a@gmail.com> Date: Fri, 15 Oct 2021 09:37:05 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20211014071141.71871-1-hongtao.liu@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, 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: Fri, 15 Oct 2021 15:37:11 -0000 On 10/14/21 1:11 AM, liuhongt wrote: > Hi Kewen: > Cound you help to verify if this patch fix those regressions > for rs6000 port. > > As discussed in [1], this patch add xfail/target selector to those > testcases, also make a copy of them so that they can be tested w/o > vectorization. Just to make sure I understand what's happening with the tests: the new -N-novec.c tests consist of just the casses xfailed due to vectorizartion in the corresponding -N.c tests? Or are there some other differences (e.g., new cases in them, etc.)? I'd hope to eventually remove the -novec.c tests once all warnings behave as expected with vectorization as without it (maybe keeping just one case both ways as a sanity check). For the target-supports selectors, I confess I don't know enough about vectorization to find their names quite intuitive enough to know when to use each. For instance, for vect_slp_v4qi_store: +# Return the true if target support vectorization of v4qi store. +proc check_effective_target_vect_slp_v4qi_store { } { + set pattern {add new stmt: MEM } + return [expr { [check_vect_slp_vnqihi_store_usage $pattern ] != 0 }] +} When should this selector be used? In cases involving 4-byte char stores? Only naturally aligned 4-bytes stores (i.e., on a 4 byte boundary, as the check_vect_slp_vnqihi_store_usage suggests?) Or 4-byte stores of any types (e.g., four chars as well as two 16-bit shorts), etc.? Hopefully once all the warnings handle vectorization we won't need to use them, but until then it would be good to document this in more detail in the .exp file. Finally, thank you for adding comments to the xfailed tests referencing the corresponding bugs! Can you please mention the PR in the comment in each of the new xfails? Like so: index 7d29b5f48c7..cb687c69324 100644 --- a/gcc/testsuite/c-c++-common/Wstringop-overflow-2.c +++ b/gcc/testsuite/c-c++-common/Wstringop-overflow-2.c @@ -189,8 +189,9 @@ void ga1__ (void) struct A1 a = { 1 }; a.a[0] = 0; + // O2 vectorization regress Wstringop-overflow case (1), refer to pr102462. a.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" } - a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { i?86-*-* x86_64-*-* } } } + a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v2qi_store } } } ^^^^^^^^ PR in dg-warning comment. This should make it easier to deal with the XFAILs once the warnings have improved to handle vectorization. Martin