From patchwork Tue Aug 6 09:04:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1969390 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LzcndunH; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WdSBG25cdz1yXs for ; Tue, 6 Aug 2024 19:07:34 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 25086385C6CD for ; Tue, 6 Aug 2024 09:07:32 +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 ESMTP id 746AF385DDE4 for ; Tue, 6 Aug 2024 09:05:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 746AF385DDE4 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 746AF385DDE4 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=1722935108; cv=none; b=HDGXmc1uKJE9UVhd+mGT+WimkYtjwH1AD+GoTAI6x6QnAWBzWNpYoPjkv4XzAoQ6QQiOHAFGolGMa4WedkUyf6hvi6OWzl6ynF5bm6IhpXRJwHhYt+h1tnh5DsjE1v48KZhx084P6duu4AVi4/bjzizlUPC69tJFdp1auJwejlk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722935108; c=relaxed/simple; bh=zuizHGFVjU7Cywbe7wxJ7mMqYkghQjWLE2CPJSJ5K6g=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=m25nhHgn65GCGyrKCuEjV4VzcbdghQqGgK96o0eTgBFg+QbisV9L75KeqgxGQld4SdcO4zt41103pENhtpoNhNU1YQBHbrXMvNTx3AjynKJXaZasZM0vegzX0/mnGDEV0tQqFsutH4nwtNEDY1zV9kRLPFC8KZpJUYLHeJniYDk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722935106; 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; bh=s6BSU6u6xZSlnEuSCAQBMoij2vq3WEL+4F5mO7zXeYI=; b=LzcndunHbNLYc+7qaBPi5GpJl1xhqBrA73iv5Hun2uFZZ19DNOPJYYgRbmfaF4yUuKav4A e/CvzaWxiOAhazDr1ua/xtngHypC1nqDfRRYpGn3mFeR9TCTP8oV0nHSZcPRE1Wkvjd+mM IHb9/O9Zdz6J85D+LaKcQV5+P/Lfw1k= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-576-NdTwRHH8P1iXe0I9ZS3R6w-1; Tue, 06 Aug 2024 05:05:00 -0400 X-MC-Unique: NdTwRHH8P1iXe0I9ZS3R6w-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 73B741956048; Tue, 6 Aug 2024 09:04:59 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.25]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BC8411956046; Tue, 6 Aug 2024 09:04:58 +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 47694u722573725 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 6 Aug 2024 11:04:56 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 47694t3I2573724; Tue, 6 Aug 2024 11:04:55 +0200 Date: Tue, 6 Aug 2024 11:04:55 +0200 From: Jakub Jelinek To: Richard Biener , Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix up pr116037.c test [PR116245] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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.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~incoming=patchwork.ozlabs.org@gcc.gnu.org Hi! The test FAILs on big endian targets, because VV is a vector of unsigned __int128 and VC vector of unsigned char and so ((VC) vv)[0] is 0x01 on little endian but 0xff on big endian and PDP endian. As I believe it is intentional to test it as it is written on little endian, the following patch just adds another case for big endian and for other endians instead of figuring out what exactly to fetch it fetches the whole unsigned __int128 and casts it to unsigned char. Not that pdp11 has __int128 support... Tested on x86_64-linux and powerpc64-linux, ok for trunk? 2024-08-06 Jakub Jelinek PR rtl-optimization/116037 PR testsuite/116245 * gcc.dg/torture/pr116037.c (foo): Fix up for big end middle endian. Jakub --- gcc/testsuite/gcc.dg/torture/pr116037.c.jj 2024-07-25 21:34:56.190147936 +0200 +++ gcc/testsuite/gcc.dg/torture/pr116037.c 2024-08-06 10:58:56.621762156 +0200 @@ -16,7 +16,13 @@ VL vl; VV foo (unsigned long long x, VV vv) { +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ x &= -((VC) vv)[0]; +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + x &= -((VC) vv)[sizeof (__int128) - 1]; +#else + x &= -(unsigned char) (vv[0]); +#endif vi *= (VI) (VS){ -vs[0], vc[0], vs[1], vi[7], vs[7], vl[7], x, vi[5] }; return x + vv; }