Message ID | ZajWPMMrtiac3E3q@tucnak |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp182390dyb; Wed, 17 Jan 2024 23:42:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6JGguBCKyL7N4Fu7icK/DxxWMVZEHKob5l7h1Rwy4563vhkCOGoKwdcRU2IET9bk1ErdZ X-Received: by 2002:a05:6808:2201:b0:3bd:464c:94f0 with SMTP id bd1-20020a056808220100b003bd464c94f0mr560381oib.75.1705563768148; Wed, 17 Jan 2024 23:42:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705563768; cv=pass; d=google.com; s=arc-20160816; b=pCj/nLoVn3CuI3kng0YXg4Xn+z4AoaEiCSkkWzddV0UkFycWCk8HbuCR9LoabHWpD7 ViFO98AVbn2HH7Mjv/JFFpGBR1sKhLQPyy3icev9gaDYhiVIqSEZyRYqhrXnFVT3IiC3 A3EPThKAGuR2eHZMj4HbZNzZu4peg2BJ9UupD/z/9GnODGcGK0iTa9Xqe5UTKq2uQp1+ MfBKucbVFs4G0OySWYkTAlHDgktWanngce+0Uzr3/uqvnx8tOnZxJ7hx6zZDg5Ve5sZp Yc1FrurFn94zbtFAgtxEts4HGJoWLglsY01xSzdeDMvtSawXBVgyrcuMNTl3VQt0FaKF 73gA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=Ws21tZQoBx/6Ni6lVvykg+SVtwVowFWJYtMI1JwR/ac=; fh=FCjeRajqaQYHMkQtfIia8KT5yBac53mYOLLyJhYG/AY=; b=uzkZr/iC43g8g6x0T77RG7g/IsNMZGFbZvTIReqEz3GtvpG3B+AkuioZV80EGGWLMI ptJQ0D4JcNTtphFLLsNVUyrSZR2p6qhhkfAnlzQttE+aFoe4Zmxh11Cp5N8Nhy96uLAe 3I3auhHVk48KJqUU1pkTbU5JMUmtg1CIjoL4P1IsZvytysxv9hro34g9WqEppKWVp+FA jGCz9WWTCUzn+l56hZtY7PjQQYq62Af8/Fj7woWdJtsWr4gxCx2CJ1SM7XKtF/YxaAou GQ6suiHcXKAjoBFFH98rWdx+ABYiscWzzO7xiz0UkLlcd6sa0p04JFACHIEqV+5kaGCS J/1Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ONzh1mSB; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id oq47-20020a05620a612f00b007833aafe7b4si12841679qkn.621.2024.01.17.23.42.48 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 23:42:48 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ONzh1mSB; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE57D3858403 for <ouuuleilei@gmail.com>; Thu, 18 Jan 2024 07:42:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 78A173857B8D for <gcc-patches@gcc.gnu.org>; Thu, 18 Jan 2024 07:41:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 78A173857B8D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 78A173857B8D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705563716; cv=none; b=a+FlK3JTVWxE+BJPomX3AX1cqanJFO+aGudnFNIK6JkVDN/zSTRU0aiAAXqEEc2Glwz1Rng2UF2VFzom9IRDsOOsat/5s1BRA73zj7hRaqHKqK+lFOblkk2eOkHpnL1dMZEUYKR/i/4McwlN/tMl/zGB8eQ1YeUDpNd1Gnma0kI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705563716; c=relaxed/simple; bh=5eC97ECh50tvEgOvZAJkQVDQ7MoWDky7NO1LxdAYRVA=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Hu+qI+HvjWysmfH95hR534UE36Ac0VKXuSnXwcZStC559YoT011G0tTaZPKujGVHCzLA56KO82M7mSHm+SSOVFId3Lv1IHkrQVPFtnW/WwuRXtpGjOnpISVKL0a4xiV3D3tGb4US46QTdO9Df8Z31GphLQTcq6OQsq7wrH+nSWE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705563714; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=Ws21tZQoBx/6Ni6lVvykg+SVtwVowFWJYtMI1JwR/ac=; b=ONzh1mSBWhVCl0oOxEXWLHXYk5SRuogUfox+kDiqoOan3Lh1QUq5LjJl2m+0eC1eDKImkm boSt2HkriisJMsT0DLNZD5d8LDp0dAteroQd0dPb/iM31V1wwvOC0kFDXnTFhj2sio7LpN UA10Pc668F5RqrffPBJcE5COMHMq/tU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-654-RHR19TSANZm1RQPM8-FccQ-1; Thu, 18 Jan 2024 02:41:52 -0500 X-MC-Unique: RHR19TSANZm1RQPM8-FccQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EBDC78352A5; Thu, 18 Jan 2024 07:41:51 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B068EC15D7E; Thu, 18 Jan 2024 07:41:51 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 40I7fndA226877 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 18 Jan 2024 08:41:49 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 40I7fm2i226873; Thu, 18 Jan 2024 08:41:48 +0100 Date: Thu, 18 Jan 2024 08:41:48 +0100 From: Jakub Jelinek <jakub@redhat.com> To: Richard Biener <rguenther@suse.de> Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix up scev-16.c test [PR113446] Message-ID: <ZajWPMMrtiac3E3q@tucnak> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 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=-4.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Reply-To: Jakub Jelinek <jakub@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788413233895174318 X-GMAIL-MSGID: 1788413233895174318 |
Series |
testsuite: Fix up scev-16.c test [PR113446]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jakub Jelinek
Jan. 18, 2024, 7:41 a.m. UTC
Hi! This test FAILs on i686-linux or e.g. sparc*-solaris*, because it uses vect_int effective target outside of */vect/ testsuite. That is wrong, vect_int assumes the extra added flags by vect.exp by default, which aren't added in other testsuites. The following patch fixes that by moving the test into gcc.dg/vect/ and doing small tweaks. Regtested on x86_64-linux and i686-linux, ok for trunk? 2024-01-18 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/112774 PR testsuite/113446 * gcc.dg/tree-ssa/scev-16.c: Move test ... * gcc.dg/vect/pr112774.c: ... here. Add PR comment line, use dg-additional-options instead of dg-options and drop -fdump-tree-vect-details. Jakub
Comments
On Thu, 18 Jan 2024, Jakub Jelinek wrote: > Hi! > > This test FAILs on i686-linux or e.g. sparc*-solaris*, because > it uses vect_int effective target outside of */vect/ testsuite. > That is wrong, vect_int assumes the extra added flags by vect.exp > by default, which aren't added in other testsuites. > > The following patch fixes that by moving the test into gcc.dg/vect/ > and doing small tweaks. > > Regtested on x86_64-linux and i686-linux, ok for trunk? OK, note -O2 -ftree-vectorize are default in vect.exp (so is -fno-vect-cost-model) > 2024-01-18 Jakub Jelinek <jakub@redhat.com> > > PR tree-optimization/112774 > PR testsuite/113446 > * gcc.dg/tree-ssa/scev-16.c: Move test ... > * gcc.dg/vect/pr112774.c: ... here. Add PR comment line, use > dg-additional-options instead of dg-options and drop > -fdump-tree-vect-details. > > --- gcc/testsuite/gcc.dg/tree-ssa/scev-16.c.jj 2023-12-08 08:28:23.790168953 +0100 > +++ gcc/testsuite/gcc.dg/tree-ssa/scev-16.c 2024-01-17 18:21:26.397146209 +0100 > @@ -1,18 +0,0 @@ > -/* { dg-do compile } */ > -/* { dg-require-effective-target vect_int } */ > -/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */ > - > -int A[1024 * 2]; > - > -int foo (unsigned offset, unsigned N) > -{ > - int sum = 0; > - > - for (unsigned i = 0; i < N; i++) > - sum += A[i + offset]; > - > - return sum; > -} > - > -/* Loop can be vectorized by referring "i + offset" is nonwrapping from array. */ > -/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { target { ! { avr-*-* msp430-*-* pru-*-* } } } } } */ > --- gcc/testsuite/gcc.dg/vect/pr112774.c.jj 2024-01-17 18:20:25.401978923 +0100 > +++ gcc/testsuite/gcc.dg/vect/pr112774.c 2024-01-17 18:21:16.194285496 +0100 > @@ -0,0 +1,19 @@ > +/* PR tree-optimization/112774 */ > +/* { dg-do compile } */ > +/* { dg-require-effective-target vect_int } */ > +/* { dg-additional-options "-O2 -ftree-vectorize" } */ > + > +int A[1024 * 2]; > + > +int foo (unsigned offset, unsigned N) > +{ > + int sum = 0; > + > + for (unsigned i = 0; i < N; i++) > + sum += A[i + offset]; > + > + return sum; > +} > + > +/* Loop can be vectorized by referring "i + offset" is nonwrapping from array. */ > +/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { target { ! { avr-*-* msp430-*-* pru-*-* } } } } } */ > > Jakub > >
On Thu, Jan 18, 2024 at 08:40:04AM +0100, Richard Biener wrote: > > This test FAILs on i686-linux or e.g. sparc*-solaris*, because > > it uses vect_int effective target outside of */vect/ testsuite. > > That is wrong, vect_int assumes the extra added flags by vect.exp > > by default, which aren't added in other testsuites. > > > > The following patch fixes that by moving the test into gcc.dg/vect/ > > and doing small tweaks. > > > > Regtested on x86_64-linux and i686-linux, ok for trunk? > > OK, note -O2 -ftree-vectorize are default in vect.exp (so is > -fno-vect-cost-model) It is actually the check_vect_support_and_set_flags added flags here, so on i686-linux -msse2, on sparc*-* -mcpu=ultrasparc -mvis, -mvsx -mno-allow-movmisalign or -mcpu=970 on some powerpc*, etc. that matters here. Jakub
--- gcc/testsuite/gcc.dg/tree-ssa/scev-16.c.jj 2023-12-08 08:28:23.790168953 +0100 +++ gcc/testsuite/gcc.dg/tree-ssa/scev-16.c 2024-01-17 18:21:26.397146209 +0100 @@ -1,18 +0,0 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target vect_int } */ -/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */ - -int A[1024 * 2]; - -int foo (unsigned offset, unsigned N) -{ - int sum = 0; - - for (unsigned i = 0; i < N; i++) - sum += A[i + offset]; - - return sum; -} - -/* Loop can be vectorized by referring "i + offset" is nonwrapping from array. */ -/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { target { ! { avr-*-* msp430-*-* pru-*-* } } } } } */ --- gcc/testsuite/gcc.dg/vect/pr112774.c.jj 2024-01-17 18:20:25.401978923 +0100 +++ gcc/testsuite/gcc.dg/vect/pr112774.c 2024-01-17 18:21:16.194285496 +0100 @@ -0,0 +1,19 @@ +/* PR tree-optimization/112774 */ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-O2 -ftree-vectorize" } */ + +int A[1024 * 2]; + +int foo (unsigned offset, unsigned N) +{ + int sum = 0; + + for (unsigned i = 0; i < N; i++) + sum += A[i + offset]; + + return sum; +} + +/* Loop can be vectorized by referring "i + offset" is nonwrapping from array. */ +/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { target { ! { avr-*-* msp430-*-* pru-*-* } } } } } */