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: 66836 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3A1AB38708C1 for ; Fri, 24 Mar 2023 09:01:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A1AB38708C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679648498; 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=EG9RJk5KL5c+Cb+FQ463iiSK0+ILvuUfxuwwWI7ti8AMyXU+I1vwPK59GtKodq36R YSxmIPh4mIGrjfNUn5kGFv0Mx49LLsm2Xou6ESxzFg78mF66JjuWYKRSrvTImYvC7E 2U5TGrEGCinxFI6nPnIiph6yTntKGkJYxLJNQgoQ= 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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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; } } -