From patchwork Sat Aug 10 08:57:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1971142 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=gSsJf5y7; 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 4WgvnL589gz1yXn for ; Sat, 10 Aug 2024 18:57:58 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 716FF3858C98 for ; Sat, 10 Aug 2024 08:57:56 +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.129.124]) by sourceware.org (Postfix) with ESMTP id 1DF2E3858D20 for ; Sat, 10 Aug 2024 08:57:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1DF2E3858D20 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 1DF2E3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723280254; cv=none; b=X0c/BrAhEejajxAck0/VjaxArsyUZcpYmSMWaX3bcQgtdqZL6tBWZFqDrfC1xbYjAdF11TYlPnC6F+/3okOtdv0rS+n2gqk3inrQF6Pgh3kVWYWtfzMOHe1aQriN60KZPxP8Q6zhMZneJi03kgY9G/HFlU+bhYQG9ykHKUmjmpA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723280254; c=relaxed/simple; bh=+Lax9mGDqu8J9U5vuCOHQuKl6ZgHR3q85uuwFw+kwNQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=OnMYNhltMTQnqZ7tKiqQzzmv4iK0qhyLQOjnT0CY7+xFnaSkkQdMj9tsNYBu5hqb9BvY3BghIpDjso/p+M300+1ig2wBuag0Dsv+q34jq7WVSv/0265sXtXHeisQtkFp6K3Kgl8400MTLmh0w+pQGNFr2gi2Uxu3TtYe3I0Tl2w= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723280252; 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=s+tuY5F6tiGhgk9oZhHDb+/cDJmC6LX1jFisZgMjZTQ=; b=gSsJf5y7snVK4EVKX6Sum4lFPe8hKzbkFF35m5N5TSR3/j+iGRCEHd1T5HaOS+Ax9bqyXT 4pJNT5CMbB7PQQaSUPSSvx/YfITcs6pfvp0GX02fJGKcfWAH+LDKcXt61Xbx+jvLNtr6Ga l3moNtipCaqG2LCkvSHN/KuHN73/nCw= Received: from mx-prod-mc-01.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-121-1R_GLNjkMU2_14g5gn44Tg-1; Sat, 10 Aug 2024 04:57:31 -0400 X-MC-Unique: 1R_GLNjkMU2_14g5gn44Tg-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3701E1954B12; Sat, 10 Aug 2024 08:57:30 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.25]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 459371955F43; Sat, 10 Aug 2024 08:57:29 +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 47A8vQ8D2973093 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 10 Aug 2024 10:57:26 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 47A8vQSD2973092; Sat, 10 Aug 2024 10:57:26 +0200 Date: Sat, 10 Aug 2024 10:57:25 +0200 From: Jakub Jelinek To: Alejandro Colomar Cc: gcc-patches@gcc.gnu.org Subject: [committed] testsuite: Fix up sse3-addsubps.c Message-ID: References: <5287a1f5-385c-c59f-c91d-2e579f24b92@redhat.com> <36C44389-E422-4033-9E4F-0416FF5BF920@inria.fr> <3f00dae3fbb64c1b092ac7a5d04df2cd9415f67d.camel@tugraz.at> <1E2AF7F2-9EAA-44A0-BC1D-A85769935334@inria.fr> <327cd4b-d855-dc31-1229-e224e8c495a8@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.6 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_H3, 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 On Thu, Aug 08, 2024 at 10:01:14PM +0200, Alejandro Colomar wrote: > Here are the suspects: > > ./gcc/testsuite/gcc.target/powerpc/sse3-addsubps.c:80: > for (i = 0; i < sizeof (vals) / sizeof (vals); i += 8) This is an obvious typo as can be seen in what the test does, what similar tests committed in the same commit do (all the others use sizeof (vals) / sizeof (vals[0])) and what the test originates from (i386/sse3-addsubps.c uses there constant 80, which is that sizeof (vals) / sizeof (vals[0])). Tested on powerpc64-linux (where the test is UNSUPPORTED) and powerpc64le-linux, where the test passes before (in that case it tests just one vector rather than all 10) and after the change. Committed to trunk as obvious. 2024-08-10 Jakub Jelinek * gcc.target/powerpc/sse3-addsubps.c (TEST): Divide by sizeof (vals[0]) rather than sizeof (vals). Jakub --- gcc/testsuite/gcc.target/powerpc/sse3-addsubps.c.jj3 2024-03-18 11:02:16.152884555 +0000 +++ gcc/testsuite/gcc.target/powerpc/sse3-addsubps.c 2024-08-10 08:46:57.259430503 +0000 @@ -77,7 +77,7 @@ TEST (void) int i; int fail = 0; - for (i = 0; i < sizeof (vals) / sizeof (vals); i += 8) + for (i = 0; i < sizeof (vals) / sizeof (vals[0]); i += 8) { p1[0] = vals[i+0]; p1[1] = vals[i+1];