| Message ID | 20261011165457.716358-1-dimitar@dinux.eu |
|---|---|
| State | Committed |
| Commit | 6ae2ad3169ab88823d288082a9058c3bf6db40fd |
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1F5754BA23C1 for <patchwork@sourceware.org>; Sun, 11 Oct 2026 16:56:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F5754BA23C1 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=dinux.eu header.i=@dinux.eu header.a=rsa-sha256 header.s=default header.b=a5hrnpJb X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from server28.superhosting.bg (server28.superhosting.bg [217.174.156.11]) by sourceware.org (Postfix) with ESMTPS id 504304BA2E23 for <gcc-patches@gcc.gnu.org>; Sun, 11 Oct 2026 16:55:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 504304BA2E23 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dinux.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinux.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 504304BA2E23 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=217.174.156.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791737724; cv=none; b=lTBwRvRikoi746eGRabFlf6wEdsbRXQ3GcQFC8XcfN7J+MDxn/WanaI8tf6VQycBdqWTh2Ab1uSmRxZClKyJz6gRXJhEYEbJgTcbVGN2FPNDAWuzRcVb+9xP3IF5xUud6ROYa6Cx7hxYJ/GGzjT43zii1oJpWVIZ6rTl0+dcfNk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791737724; c=relaxed/simple; bh=L/XVVTNxC0DVPeMbvGu8zkUaeXS3CxxdJzykdmoU+gw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ur0j341Qg+03PicwVQ4rRdd1RXDGEuY+0mKYLEoQ5RkdkVRGMxp0FSUhA+yymxqzZLx4at+49bxs8lr5OpXKDp1mZIkxNvtPfiv+7jnb78ihuaYjH9hEXiC2Felt/f6Hkg2ezkLxAhG7E/OEv6MibuQlTACgOu+gS5ECUY5valc= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=dinux.eu header.i=@dinux.eu header.a=rsa-sha256 header.s=default header.b=a5hrnpJb DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 504304BA2E23 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dinux.eu; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vqwoMBAcJ01x6wKarhOWHkWGlljyvh0U7OhkO0YQ9Gw=; b=a5hrnpJbJz26lbWZv6cMK0Ko7S cz0B9LfsR+A6fRwQoUfmigtWPXapRNOWh4lOHFjVyy+WMHYOhLSoPGYWSJPSHrZaLCAaX9h5EAquS 7yDH/bjxLiw+6dGJmYMUIXMEAJugwkSX5GhvmdhoPiZEHk3+hpI8XeYqzotvDwceYnwkxebjx1SCn 8Y49m3DgVxscCyZdRfovpRsUTWJ62DZmQ094ce+CGlI8cSGd2mskQX9BmwiAh3B4eHQOailIsWvcB wM/lxApBSyaLMQMbc0RcTdgWvbbdMJVRly5Xe1V+91EW9bnbP+iZUoi18pGiUoJ4QZ6Es5Mas26YU 1fYI9ETw==; Received: from 95-42-20-142.ip.btc-net.bg ([95.42.20.142]:56908 helo=kendros.lan) by server28.superhosting.bg with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from <dimitar@dinux.eu>) id 1xFwpR-00000003eCA-3CZo; Sun, 11 Oct 2026 19:55:19 +0300 From: Dimitar Dimitrov <dimitar@dinux.eu> To: gcc-patches@gcc.gnu.org Cc: Dimitar Dimitrov <dimitar@dinux.eu> Subject: [committed] pru: Handle vector modes in CLZ_DEFINED_VALUE_AT_ZERO Date: Sun, 11 Oct 2026 19:54:57 +0300 Message-ID: <20261011165457.716358-1-dimitar@dinux.eu> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server28.superhosting.bg X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dinux.eu X-Get-Message-Sender-Via: server28.superhosting.bg: authenticated_id: dimitar@dinux.eu X-Authenticated-Sender: server28.superhosting.bg: dimitar@dinux.eu X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_PBL, SPF_HELO_PASS, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
[committed] pru: Handle vector modes in CLZ_DEFINED_VALUE_AT_ZERO
|
|
Commit Message
Dimitar Dimitrov
Oct. 11, 2026, 4:54 p.m. UTC
Commit r17-5047-gd2e1b1248a17d0 started passing the vector mode instead
of scalar mode to CLZ_DEFINED_VALUE_AT_ZERO. This resulted in build
failure for pru-unknown-elf:
.../gcc/gcc/config/pru/pru.h:576:48: error: cannot convert ‘poly_int<1, long int>’ to ‘int’ in assignment
576 | ((VALUE) = GET_MODE_BITSIZE (MODE) - 1 - 32, 2)
Fix by using GET_MODE_UNIT_BITSIZE, the same way the original patch did
for other targets.
Pushed to trunk as r17-5062-g6ae2ad3169ab88.
gcc/ChangeLog:
* config/pru/pru.h (CLZ_DEFINED_VALUE_AT_ZERO): Use
GET_MODE_UNIT_BITSIZE.
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
gcc/config/pru/pru.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 10/11/26 10:54 AM, Dimitar Dimitrov wrote: > Commit r17-5047-gd2e1b1248a17d0 started passing the vector mode instead > of scalar mode to CLZ_DEFINED_VALUE_AT_ZERO. This resulted in build > failure for pru-unknown-elf: > > .../gcc/gcc/config/pru/pru.h:576:48: error: cannot convert ‘poly_int<1, long int>’ to ‘int’ in assignment > 576 | ((VALUE) = GET_MODE_BITSIZE (MODE) - 1 - 32, 2) > > Fix by using GET_MODE_UNIT_BITSIZE, the same way the original patch did > for other targets. > > Pushed to trunk as r17-5062-g6ae2ad3169ab88. > > gcc/ChangeLog: > > * config/pru/pru.h (CLZ_DEFINED_VALUE_AT_ZERO): Use > GET_MODE_UNIT_BITSIZE. > > Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu> Thanks, I saw pru-elf fail overnight, but I'm still catching up from all the travel the last few months, so didn't start to chase it down. I suspect the same problem is also affecting vax. I'll try your change over there too. Thanks again, jeff
On Sun, Oct 11, 2026 at 10:57:30AM -0600, Jeff Law wrote: > > > On 10/11/26 10:54 AM, Dimitar Dimitrov wrote: > > Commit r17-5047-gd2e1b1248a17d0 started passing the vector mode instead > > of scalar mode to CLZ_DEFINED_VALUE_AT_ZERO. This resulted in build > > failure for pru-unknown-elf: > > > > .../gcc/gcc/config/pru/pru.h:576:48: error: cannot convert ‘poly_int<1, long int>’ to ‘int’ in assignment > > 576 | ((VALUE) = GET_MODE_BITSIZE (MODE) - 1 - 32, 2) > > > > Fix by using GET_MODE_UNIT_BITSIZE, the same way the original patch did > > for other targets. > > > > Pushed to trunk as r17-5062-g6ae2ad3169ab88. > > > > gcc/ChangeLog: > > > > * config/pru/pru.h (CLZ_DEFINED_VALUE_AT_ZERO): Use > > GET_MODE_UNIT_BITSIZE. > > > > Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu> > Thanks, I saw pru-elf fail overnight, but I'm still catching up from all the > travel the last few months, so didn't start to chase it down. I suspect the > same problem is also affecting vax. I'll try your change over there too. Ups, my bad, in https://gcc.gnu.org/pipermail/gcc-patches/2026-September/732870.html I convinced myself that the change is not needed for {nvptx,pru,vax} since I assumed that the vectorizer does not fire for those. Since pru and vax are fixed in the meantime (thanks!) this leaves me with nvptx for which I will prepare a patch shortly. Sorry for the noise. Cheers, Stefan > > Thanks again, > jeff
diff --git a/gcc/config/pru/pru.h b/gcc/config/pru/pru.h index a370d08c385..c36b8cfd257 100644 --- a/gcc/config/pru/pru.h +++ b/gcc/config/pru/pru.h @@ -573,7 +573,7 @@ do { \ /* See definition of clz pattern for rationale of the value. */ #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \ - ((VALUE) = GET_MODE_BITSIZE (MODE) - 1 - 32, 2) + ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE) - 1 - 32, 2) /* Jumps are cheap on PRU. */ #define LOGICAL_OP_NON_SHORT_CIRCUIT 0