From patchwork Fri Mar 24 08:54:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 74436 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp475725vqo; Fri, 24 Mar 2023 02:02:16 -0700 (PDT) X-Google-Smtp-Source: AKy350a/te2IwettCIKtGm8KrV861ZHIOa1CHFHGz8jTCcEtZRv+B2k1+8Id5zh8reZwHkD4lVCg X-Received: by 2002:a05:6402:514d:b0:4fd:2b59:ef91 with SMTP id n13-20020a056402514d00b004fd2b59ef91mr2038617edd.3.1679648535955; Fri, 24 Mar 2023 02:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679648535; cv=none; d=google.com; s=arc-20160816; b=Ic0T22lYBxU3fSX/iagqWmq8ToqrAoHVWUHm8t1fqxVPFZfj7RaxWvk/TtzimlXd/i J7uj0TtfXneBDsmBHmQaeozj8781hGP6j9LZb/mtEv9ctD8EKu0FeFLjIkAslUi0kZlh LONH5yMkB4L+6EQV4bIrm0zZLYufpLUxGAcSwTvYGckJo+7XqlT41TpjhxZW5DFEbFOR IJ0fVKPCuta84NXj04pJ7CnAl6ex7yid2z2YCeYcUyDWSxvmvwVn753xZssNa0K6nUrO ZS9Qk2js6mBKnx3BpgPX1xPjRpJ54Xf/ycSlg+AD83lgBWFs1OKfPUBkLFSiq6jWJJ29 2jLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:in-reply-to:mime-version:references:message-id :subject:cc:to:date:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=Se7eBor+4pd4KyrQdUyb4WojiyKZWt7KrT9yfHjGuMo=; b=PNH4/Iwgj+4SVAEDXrS3K+DARLWHM5xnA+cVmn64WC8Hrmh/Cf/pe9f2bggOWk8Jl1 bJSB9l4ZBl0URC54p17zqZmCy4z9Gs0ySMLrWTi2b4zfBuDhjoaeXjOfgU7Ufvq66nyC 574E94MJrLy2X0PYRpyYATYBg9i0WuFvipnzxVjMexSbO4BRXr7bMP1plQzc3riUJIgL tx48CHhQOTBpXln9qZyIXDr4ORUh0DkZ7yzQhhGGQ7fZgnq0+H3g64cZZ45rEmNiMfh3 suVCJi8/pM2chYuNTFZy+qLLq4xEtakYOJWA9Fo/8AIrBztTnyMeG1EDPfRPKj1o+7AY CfdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Vvuylufl; 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=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id c13-20020aa7c98d000000b004fd29e75157si21882755edt.343.2023.03.24.02.02.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 02:02:15 -0700 (PDT) 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=@gcc.gnu.org header.s=default header.b=Vvuylufl; 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=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3DF3D3875409 for ; Fri, 24 Mar 2023 09:01:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3DF3D3875409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679648515; bh=Se7eBor+4pd4KyrQdUyb4WojiyKZWt7KrT9yfHjGuMo=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Vvuylufl0nw7tWkBNnMDtsH8siFj28zd5/WB1ejCjiR7xuKOjCVy7nib+gTdEpIuT tsYUSX/tt/6bWvOQaPAdQR3rcMFdvUArBtYHwYZ+dmwDLrCidFuC2RnDsmOPHVqQyT Em+RsyadQEdZxqHurMsTrANOqBtr3Sc0JXqWXNWk= 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 46D7E3858CDA for ; Fri, 24 Mar 2023 09:01:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 46D7E3858CDA Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-651-szvnQAmgOVG8IQmODyN17A-1; Fri, 24 Mar 2023 04:54:37 -0400 X-MC-Unique: szvnQAmgOVG8IQmODyN17A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 568BD3C025D1 for ; Fri, 24 Mar 2023 08:54:32 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 133501121314; Fri, 24 Mar 2023 08:54:26 +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 32O8s7T43026802 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 24 Mar 2023 09:54:07 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 32O8s7HY3026801; Fri, 24 Mar 2023 09:54:07 +0100 Date: Fri, 24 Mar 2023 09:54:06 +0100 To: Vladimir Makarov Cc: "gcc-patches@gcc.gnu.org" Subject: [committed] testsuite: Fix up gcc.target/i386/pr109137.c testcase [PR109137] Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, 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 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-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761239142977619004?= X-GMAIL-MSGID: =?utf-8?q?1761239142977619004?= Hi! On Wed, Mar 22, 2023 at 01:37:39PM -0400, Vladimir Makarov via Gcc-patches wrote: > * gcc.target/i386/pr109137.c: New. The testcase has a couple of small problems: 1) had -m32 in dg-options, that should never be done, instead the test should be guarded on ia32 2) adds -fPIC unconditionally (that should be guarded on fpic effective target) 3) using #include for a RA test seems unnecessary, __builtin_memset handles it without the header Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2023-03-24 Jakub Jelinek PR target/109137 * gcc.target/i386/pr109137.c: Remove -m32 from dg-options, instead require ia32 effective target. Only add -fPIC for fpic effective target. Remove #include , use __builtin_memset instead of memset. Jakub --- gcc/testsuite/gcc.target/i386/pr109137.c.jj 2023-03-23 10:00:58.776093791 +0100 +++ gcc/testsuite/gcc.target/i386/pr109137.c 2023-03-23 19:16:37.858850237 +0100 @@ -1,6 +1,8 @@ -/* { dg-do compile } */ -/* { dg-options "-m32 -O3 -march=znver1 -fPIC -mfpmath=sse -w" } */ -#include +/* PR target/109137 */ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-O3 -march=znver1 -mfpmath=sse -w" } */ +/* { dg-additional-options "-fPIC" { target fpic } } */ + typedef struct { char bytestream_end; } CABACContext; @@ -12,7 +14,7 @@ typedef struct { } H264SliceContext; H264SliceContext ff_h264_decode_mb_cabac_sl; void ff_h264_decode_mb_cabac(void) { - memset((void*)ff_h264_decode_mb_cabac_h_0, 6, 48); + __builtin_memset((void*)ff_h264_decode_mb_cabac_h_0, 6, 48); int i; for (;; i++) { __asm__(""/* { dg-error "'asm' operand has impossible constraints" } */ @@ -25,4 +27,3 @@ void ff_h264_decode_mb_cabac(void) { decode_cabac_mb_intra4x4_pred_mode_mode; } } -