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 ESMTPS id 2D8913858C5F for ; Fri, 10 Feb 2023 09:11:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D8913858C5F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676020266; 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:in-reply-to:in-reply-to: references:references; bh=44CZcsq415iaBr3ms1wm5h/Ih9cZAoFqnKBBKYCvPDA=; b=Y6aY9xiVDV2s7ndTmYXZWL5a52QCH+ZHqgWvAtrsbDZI8Essek5SAhQSxroMLdARqSTQCr CQ1yLGrRYaVtWTglVs8nchsUkrn56ushGgS9vwSNIYm2ZSdpvEurucPpe7+bCIJ/JDTgBn E5o1nzuYROGyDesz2s1Ggm48TFL9PEg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-654-uQ1OCtHMP_6FAJErSvzphw-1; Fri, 10 Feb 2023 04:11:05 -0500 X-MC-Unique: uQ1OCtHMP_6FAJErSvzphw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 614A08828C5; Fri, 10 Feb 2023 09:11:05 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C086400DB1E; Fri, 10 Feb 2023 09:11:04 +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 31A9B2W44065666 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 10 Feb 2023 10:11:02 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 31A9B01I4065663; Fri, 10 Feb 2023 10:11:00 +0100 Date: Fri, 10 Feb 2023 10:11:00 +0100 From: Jakub Jelinek To: Andrew Stubbs Cc: Richard Biener , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 3/3] vect: inbranch SIMD clones Message-ID: Reply-To: Jakub Jelinek References: <8022b190-387b-c6a9-a8fe-1d18a9140e93@codesourcery.com> <15d420d5-45da-d4d5-13e2-e6ca7691e096@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <15d420d5-45da-d4d5-13e2-e6ca7691e096@codesourcery.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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=-3.5 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_H2,SPF_HELO_NONE,SPF_NONE,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 Fri, Jan 06, 2023 at 12:20:33PM +0000, Andrew Stubbs wrote: > > > +/* Ensure the the in-branch simd clones are used on targets that support > > > + them. These counts include all call and definitions. */ > > > + > > > +/* { dg-skip-if "" { x86_64-*-* } { "-flto" } { "" } } */ > > > > Drop lines line above. > > I don't want to drop the comment because I get so frustrated by testcases > that fail when something changes and it's not obvious what the original > author was actually trying to test. > > I've tried to fix the -flto thing and I can't figure out how. The problem > seems to be that there are two dump files from the two compiler invocations > and it scans the wrong one. Aarch64 has the same problem. Two dumps are because it is in a dg-do run test. I think it would be better to separate it, have for all cases one test with defaulted dg-do (in vect.exp that is either dg-do run or dg-do compile: # If the target system supports vector instructions, the default action # for a test is 'run', otherwise it's 'compile'. ) without the dg-final and then another one with the same TYPE which would be forcibly dg-do compile with dg-final and dg-additional-options "-ffat-lto-objects", then you get a single dump only. > > > +/* { dg-final { scan-tree-dump-times "simdclone" 18 "optimized" { target x86_64-*-* } } } */ > > > +/* { dg-final { scan-tree-dump-times "simdclone" 7 "optimized" { target amdgcn-*-* } } } */ > > > > And scan-tree-dump-times " = foo.simdclone" 2 "optimized"; I'd think that > > should be the right number for all of x86_64, amdgcn and aarch64. And > > please don't forget about i?86-*-* too. > > I've switched the pattern and changed to using the "vect" dump (instead of > "optimized") so that the later transformations don't mess up the counts. > However there are still other reasons why the count varies. It might be that > those can be turned off by options somehow, but probably testing those cases > is valuable too. The values are 2, 3, or 4, now, instead of 18, so that's an > improvement. But still varries between the architectures, so it is an extra maintainance nightmare. > > > +/* TODO: aarch64 */ > > > > For aarch64, one would need to include it in check_effective_target_vect_simd_clones > > first... > > I've done so and tested it, but that's not included in the patch because > there were other testcases that started reporting fails. None of the new > testcases fail for Aarch64. Sure, that would be for a separate patch. Anyway, if you want, commit the patch as is and tweak the testcases if possible incrementally. Jakub