From patchwork Mon Dec 18 11:04:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 180278 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1160247dyi; Mon, 18 Dec 2023 03:04:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOWexGoz9fC9vmUnBrPt9Kg1ibJ+7U8Yg9pjoMIxc8Vfw2ZsMqu+sbT33cwH2RrRujwxMk X-Received: by 2002:a05:622a:3d1:b0:423:bef7:7386 with SMTP id k17-20020a05622a03d100b00423bef77386mr22449224qtx.41.1702897480217; Mon, 18 Dec 2023 03:04:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702897480; cv=pass; d=google.com; s=arc-20160816; b=R4eZ7BpJuJMeAuMj5RAbtQnFxIu1Qk68XmGrdpS5FuJmevl0rhQsmS94IfNSKdxHbP agc/OLxc/0mNQH5WVT5FfAD2KBCQlGSYd3pNUJev3luZ9hSajbD418uHGB2ZttpoL2IF H2jFXxwGxXzq8JCE28+1bKcOEE8K/04/o3wbW9Qpo3XyVdSxffzelml4o3E1RDVhsdlP 5WG2bskjfimJuPzJpwxdoiP9McC6tH5lcNIYiysjx6TDgp7SNPOnjIjLRKY2e4gml4AQ 4GgOrFCoKpFP8XZzT7y6iQZMqdAWdNBL53TVqDPjsxpu6zaRmLmUrK5wc7aVTjdtNJEZ VAfw== 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:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=Sq4s3wS5x3Izv9EIR7/J1oUk92lDWhjDKCdrrVTnCv4=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=uasaEvjau+VRVrY0vfAd368L5rTplupx40vYUYlLlusNbzikKGjb8ChiNCzAjS5jrJ zQKJd32bpTPZbeshhKShhojXArBvhLF5RU40pE3arnGgjYa9g1oScowmBMfZuJGUemFd VCowlXMj0GDgehjhPM8skpI21OmJbYEkJzCK2ZMWNYzBhq/mfweRCEuNo9kyJ1N5qsT7 sZdNJOJA45iXV7B1KEOQA+YjAniAF46h5+THO6XhfHVV4E4CssWGrqa1nZVAnbSjqxjx CIr3DsTJb9N1OWu+6+Z9HAKbAWfxdmKk6vgcUiiQphAyseq9C30GIYLPpPBtrYbvh8iR qYwg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gMtGFAZo; 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 eo15-20020a05622a544f00b00423d64d67a2si26545613qtb.228.2023.12.18.03.04.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 03:04:40 -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=gMtGFAZo; 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 EABD83857C48 for ; Mon, 18 Dec 2023 11:04:39 +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 6155C38582B6 for ; Mon, 18 Dec 2023 11:04:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6155C38582B6 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 6155C38582B6 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=1702897457; cv=none; b=ZLqEZXdF/Y4iqgKafppdLFRxTJR+ZsueL/myyY4hly9NvqLxvwLdCgmREQIXKB81SKKUiprVNhQ8SB8687NK3mscP/sIKVr4/Chv6JJLFxrwhguXMsz/8pvcFN8a2P44Km0hta3oq1yfLQTcYaY5BLwTDcdLm+e4dBlKwI4zPOo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702897457; c=relaxed/simple; bh=IwxR+ClQLtYyIs3CCylbpTseewS/pEgN2/VcFO2jCOo=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=K7GxlCAMM+AZhbxvb9oEXuHIrJuyPmfDfKJZFB7Xzjk9WcE4NYhv8mjEUs+vQ/0/bdEiF9GMMJ+k/PBz0oz3VJF2tH0EPxffMkVD73Zn85pHEEx2mE9AFaxsozFuRDQjX6XdZoPXGbgeP8I2XHNtxSY5jyLOkSHUJy+56o5QlLc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702897448; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type; bh=Sq4s3wS5x3Izv9EIR7/J1oUk92lDWhjDKCdrrVTnCv4=; b=gMtGFAZo474YNiGI/v9dBDD75OQIxKtU6XUln7uoSzGMYid6ONSfQBuwN91/g3MPAVaLrj wtiLpPSRt0wpwkPA+yAm18xcOtBFD+o8INIUwEcNL41BNuW8ecyFkc/NPBjCFSwqaCUjwy I352PSUA5R2e/Qc4jdeV7E1SNOB/ZoE= 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-546-3yep6qrjMnC3ES96Dirybg-1; Mon, 18 Dec 2023 06:04:06 -0500 X-MC-Unique: 3yep6qrjMnC3ES96Dirybg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 70517848A65 for ; Mon, 18 Dec 2023 11:04:06 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 343392166B31 for ; Mon, 18 Dec 2023 11:04:06 +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 3BIB43uU1285983 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Mon, 18 Dec 2023 12:04:04 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3BIB43BQ1285982 for gcc-patches@gcc.gnu.org; Mon, 18 Dec 2023 12:04:03 +0100 Date: Mon, 18 Dec 2023 12:04:03 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] libgomp: Make libgomp.c/declare-variant-1.c test x86 specific Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785617428332708192 X-GMAIL-MSGID: 1785617428332708192 Hi! As written earlier, this test was written with the x86 specifics in mind and adding dg-final directives for it for other arches makes it unreadable. If a declare variant call can be resolved in gimple already as in the aarch64 or gcn cases, it can be done in gcc.dg/gomp/ and I believe we have tests like that already, the point of the test is that it is not known during gimplification time which exact call should be chosen as it depends on which declare simd clone it will be in. Tested on x86_64-linux, committed to trunk. 2023-12-18 Jakub Jelinek * testsuite/libgomp.c/declare-variant-1.c: Restrict the test to x86, drop because of that unneeded target selector from other directives and remove the aarch64 specific ones. Jakub --- libgomp/testsuite/libgomp.c/declare-variant-1.c.jj 2023-12-18 09:39:49.868349075 +0100 +++ libgomp/testsuite/libgomp.c/declare-variant-1.c 2023-12-18 11:39:09.673457755 +0100 @@ -1,9 +1,9 @@ -/* { dg-do link { target vect_simd_clones } } */ +/* { dg-do link { target { vect_simd_clones && { i?86-*-* x86_64-*-* } } } } */ /* { dg-require-effective-target lto } */ /* { dg-require-effective-target fpic } */ /* { dg-require-effective-target shared } */ /* { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized -O2 -fPIC -shared -flto -flto-partition=one" } */ -/* { dg-additional-options "-mno-sse3" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-additional-options "-mno-sse3" } */ int f01 (int a) @@ -40,17 +40,16 @@ f04 (int a) int test1 (int x) { - /* At gimplification time, we can't decide yet which function to call for - x86_64 targets, given the f01 variant. */ - /* { dg-final { scan-tree-dump-times "f04 \\\(x" 2 "gimple" { target x86_64-*-* } } } */ + /* At gimplification time, we can't decide yet which function to call, + given the f01 variant. */ + /* { dg-final { scan-tree-dump-times "f04 \\\(x" 2 "gimple" } } */ /* After simd clones are created, the original non-clone test1 shall call f03 (score 6), the sse2/avx/avx2 clones too, but avx512f clones shall call f01 with score 8. */ /* { dg-final { scan-ltrans-tree-dump-not "f04 \\\(x" "optimized" } } */ - /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 14 "optimized" { target { !aarch64*-*-* } } } } */ - /* { dg-final { scan-ltrans-tree-dump-times "f01 \\\(x" 4 "optimized" { target { !aarch64*-*-* } } } } */ - /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 10 "optimized" { target { aarch64*-*-* } } } } */ - /* { dg-final { scan-ltrans-tree-dump-not "f01 \\\(x" "optimized" { target { aarch64*-*-* } } } } */ + /* { dg-final { scan-ltrans-tree-dump-not "f02 \\\(x" "optimized" } } */ + /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 14 "optimized" } } */ + /* { dg-final { scan-ltrans-tree-dump-times "f01 \\\(x" 4 "optimized" } } */ int a = f04 (x); int b = f04 (x); return a + b;