From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 076D03858401 for ; Tue, 31 Aug 2021 12:12:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 076D03858401 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-168-7adYGN0jN028syefZZsGaw-1; Tue, 31 Aug 2021 08:12:22 -0400 X-MC-Unique: 7adYGN0jN028syefZZsGaw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 53D2F106B31A; Tue, 31 Aug 2021 12:12:21 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E090B5E7A9; Tue, 31 Aug 2021 12:12:20 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 17VCCIH72340528 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 31 Aug 2021 14:12:18 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 17VCCIpq2340527; Tue, 31 Aug 2021 14:12:18 +0200 Date: Tue, 31 Aug 2021 14:12:18 +0200 From: Jakub Jelinek To: Richard Biener , Jiufu Guo Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix gcc.dg/vect/pr101145* tests [PR101145] Message-ID: <20210831121218.GW920497@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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: Tue, 31 Aug 2021 12:12:25 -0000 Hi! I'm getting: FAIL: gcc.dg/vect/pr101145.c scan-tree-dump-times vect "vectorized 1 loops" 7 FAIL: gcc.dg/vect/pr101145_1.c scan-tree-dump-times vect "vectorized 1 loops" 2 FAIL: gcc.dg/vect/pr101145_2.c scan-tree-dump-times vect "vectorized 1 loops" 2 FAIL: gcc.dg/vect/pr101145_3.c scan-tree-dump-times vect "vectorized 1 loops" 2 FAIL: gcc.dg/vect/pr101145.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 7 FAIL: gcc.dg/vect/pr101145_1.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 2 FAIL: gcc.dg/vect/pr101145_2.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 2 FAIL: gcc.dg/vect/pr101145_3.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 2 on i686-linux (or x86_64-linux with -m32/-mno-sse). The problem is that those tests use dg-options, which in */vect/ testsuite throws away all the carefully added default options to enable vectorization on each target (and which e.g. vect_int etc. effective targets rely on). The old way would be to name those tests gcc.dg/vect/O3-pr101145*, but we can also use dg-additional-options (which doesn't throw the default options, just appends to them) which is IMO better so that we don't have to rename the tests. Tested on x86_64-linux and i686-linux, ok for trunk? 2021-08-31 Jakub Jelinek PR tree-optimization/102072 * gcc.dg/vect/pr101145.c: Use dg-additional-options with just -O3 instead of dg-options with -O3 -fdump-tree-vect-details. * gcc.dg/vect/pr101145_1.c: Likewise. * gcc.dg/vect/pr101145_2.c: Likewise. * gcc.dg/vect/pr101145_3.c: Likewise. --- gcc/testsuite/gcc.dg/vect/pr101145.c.jj 2021-08-30 08:36:11.295515537 +0200 +++ gcc/testsuite/gcc.dg/vect/pr101145.c 2021-08-31 14:04:35.691964573 +0200 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-options "-O3 -fdump-tree-vect-details" } */ +/* { dg-additional-options "-O3" } */ #include unsigned __attribute__ ((noinline)) --- gcc/testsuite/gcc.dg/vect/pr101145_1.c.jj 2021-08-30 08:36:11.295515537 +0200 +++ gcc/testsuite/gcc.dg/vect/pr101145_1.c 2021-08-31 14:04:55.083691474 +0200 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-options "-O3 -fdump-tree-vect-details" } */ +/* { dg-additional-options "-O3" } */ #define TYPE signed char #define MIN -128 #define MAX 127 --- gcc/testsuite/gcc.dg/vect/pr101145_2.c.jj 2021-08-30 08:36:11.295515537 +0200 +++ gcc/testsuite/gcc.dg/vect/pr101145_2.c 2021-08-31 14:05:05.868539591 +0200 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-options "-O3 -fdump-tree-vect-details" } */ +/* { dg-additional-options "-O3" } */ #define TYPE unsigned char #define MIN 0 #define MAX 255 --- gcc/testsuite/gcc.dg/vect/pr101145_3.c.jj 2021-08-30 08:36:11.295515537 +0200 +++ gcc/testsuite/gcc.dg/vect/pr101145_3.c 2021-08-31 14:05:17.903370103 +0200 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-options "-O3 -fdump-tree-vect-details" } */ +/* { dg-additional-options "-O3" } */ #define TYPE int * #define MIN ((TYPE)0) #define MAX ((TYPE)((long long)-1)) Jakub