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 46D7E3858CDA for ; Fri, 24 Mar 2023 09:01:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 46D7E3858CDA 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=1679648463; 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=Se7eBor+4pd4KyrQdUyb4WojiyKZWt7KrT9yfHjGuMo=; b=TiOOSYL4HWMst+FPsLiXrfKGeN6occKEIEV7Xm4vZBvTpt1s2aX+bUn3B53azR4mIKdYpx kZaxrkV+K+9BBIfBInF4GIBBMMce1O9a0CeIdhMQABQ+MRCqDq+BaEaug10VeWvSjRZ3vT j1nUtKoXKVjXJdt7DtlXT1oGlNiPHNQ= 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 From: Jakub Jelinek To: Vladimir Makarov Cc: "gcc-patches@gcc.gnu.org" Subject: [committed] testsuite: Fix up gcc.target/i386/pr109137.c testcase [PR109137] Message-ID: Reply-To: Jakub Jelinek 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-Type: text/plain; charset=us-ascii 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 List-Id: 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. --- 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; } } - Jakub