From patchwork Fri Jan 22 19:02:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1430491 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=w7GvmYUW; dkim-atps=neutral Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DMpYL3Nxdz9sB4 for ; Sat, 23 Jan 2021 06:02:46 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 896EF3896804; Fri, 22 Jan 2021 19:02:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 896EF3896804 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1611342163; bh=XlOP11+e7wWwElMbgrkzIjwXHUrkdI2qEmL1/JFYlzM=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=w7GvmYUWRloWRUlCRLxHjlDG0apENt+ngyYbQRuz8UXZi7IJIDWik3RWdppubzee6 iMzJnPVfUvAZcQ8nbOLDEVkcvv65DeWVTO/3cPJEAj+blwRCbFXE7xZRlxnoDD0p5H uufsu9su0qhe53fH0OqgbmipxLwbE6cZEyKKkQM4= 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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id C68BD3894C3B for ; Fri, 22 Jan 2021 19:02:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C68BD3894C3B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-271-YlUsMgOyMJ66KMMg8AGj9A-1; Fri, 22 Jan 2021 14:02:37 -0500 X-MC-Unique: YlUsMgOyMJ66KMMg8AGj9A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D11387950C; Fri, 22 Jan 2021 19:02:34 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-64.ams2.redhat.com [10.36.112.64]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C3C6460BE5; Fri, 22 Jan 2021 19:02:33 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 10MJ2Uc34003947 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 22 Jan 2021 20:02:30 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 10MJ2S0A4003946; Fri, 22 Jan 2021 20:02:28 +0100 Date: Fri, 22 Jan 2021 20:02:28 +0100 To: Segher Boessenkool , David Edelsohn , Richard Biener Subject: [PATCH] testsuite: Fix sse2-andnpd-1.c and sse-andnps-1.c testscases on powerpc Message-ID: <20210122190228.GS4020736@tucnak> References: <20200921080803.GF6758@kam.mff.cuni.cz> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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 Cc: gcc-patches@gcc.gnu.org, Jan Hubicka Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" On Mon, Sep 21, 2020 at 10:12:20AM +0200, Richard Biener wrote: > On Mon, 21 Sep 2020, Jan Hubicka wrote: > > these testcases now fails because they contains an invalid type puning > > that happens via const VALUE_TYPE *v pointer. Since the check function > > is noinline, modref is needed to trigger the wrong code. > > I think it is easiest to fix it by no-strict-aliasing. > > > > Regtested x86_64-linux, OK? > > OK. > > > * gcc.target/i386/m128-check.h: Add no-strict aliasing to > > CHECK_EXP macro. > > > > diff --git a/gcc/testsuite/gcc.target/i386/m128-check.h b/gcc/testsuite/gcc.target/i386/m128-check.h > > index 48b23328539..6f414b07be7 100644 > > --- a/gcc/testsuite/gcc.target/i386/m128-check.h > > +++ b/gcc/testsuite/gcc.target/i386/m128-check.h > > @@ -78,6 +78,7 @@ typedef union > > > > #define CHECK_EXP(UINON_TYPE, VALUE_TYPE, FMT) \ > > static int \ > > +__attribute__((optimize ("no-strict-aliasing"))) \ > > __attribute__((noinline, unused)) \ > > check_##UINON_TYPE (UINON_TYPE u, const VALUE_TYPE *v) \ > > { \ On powerpc64le the tests suffer from the exact same issue. Tested on powerpc64le-linux, ok for trunk? 2021-01-22 Jakub Jelinek * gcc.target/powerpc/m128-check.h (check_##UINON_TYPE): Add optimize ("no-strict-aliasing") attribute. Jakub --- gcc/testsuite/gcc.target/powerpc/m128-check.h +++ gcc/testsuite/gcc.target/powerpc/m128-check.h @@ -85,6 +85,7 @@ typedef union #define CHECK_EXP(UINON_TYPE, VALUE_TYPE, FMT) \ static int \ +__attribute__((optimize ("no-strict-aliasing"))) \ __attribute__((noinline, unused)) \ check_##UINON_TYPE (UINON_TYPE u, const VALUE_TYPE *v) \ { \