From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from server.nextmovesoftware.com (server.nextmovesoftware.com [162.254.253.69]) by sourceware.org (Postfix) with ESMTPS id 65B443858D39 for ; Fri, 29 Jul 2022 07:28:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 65B443858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nextmovesoftware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nextmovesoftware.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nextmovesoftware.com; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:In-Reply-To:References:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GxSAT5ULiajjf7u5rP3f+oqXkuT6gc9Net3c+fg2DAU=; b=fLUblCl5nrRBTYT60M8hHNUygU Hig/POEohpGFhLIIFfqebex9aUxXsk7jMvmZyNSVufPN9BIsDOz3Q82/sxa6RxwhVR33LYOg3LM9B +/paIUzbHR8+oGfCkAMfnIpue8CtOX9ffgWce88wm2uOtQFlv06fstVhpcOUp+QkvPpo1DKOe8NYG ZheaylZ9OqSq5cYqJ34pFizixQ1jAO8IafLOuNFCNvE17Grl+5JG4Zu0u3yVddoqgLYZwuKxRp7RN zNQEJIvyE5t6npZL5Z3jMVHGHzHkLB/yNuNjrWmQ6+3UvqWIFP8zCYTAOTQ3OnMCp9WPGqh0ViPzS +EsE7TBg==; Received: from host86-169-41-119.range86-169.btcentralplus.com ([86.169.41.119]:62205 helo=Dell) by server.nextmovesoftware.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oHKQ0-0006xX-Mo; Fri, 29 Jul 2022 03:28:20 -0400 From: "Roger Sayle" To: "'Segher Boessenkool'" Cc: References: <009501d8a1be$b6199e20$224cda60$@nextmovesoftware.com> <20220727202336.GE25951@gate.crashing.org> In-Reply-To: Subject: RE: [PATCH] Some additional zero-extension related optimizations in simplify-rtx. Date: Fri, 29 Jul 2022 08:28:16 +0100 Message-ID: <042901d8a31c$c719acb0$554d0610$@nextmovesoftware.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGqgpDoQOd+6+TzNywqEkVR4Bop4QGnqx6WA4dVNk2tx7l6AA== Content-Language: en-gb X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.nextmovesoftware.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nextmovesoftware.com X-Get-Message-Sender-Via: server.nextmovesoftware.com: authenticated_id: roger@nextmovesoftware.com X-Authenticated-Sender: server.nextmovesoftware.com: roger@nextmovesoftware.com X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 07:28:22 -0000 Hi Segher, > > > To implement this, and some closely related transformations, we > > > build upon the existing val_signbit_known_clear_p predicate. In the > > > first chunk, nonzero_bits knows that FFS and ABS can't leave the > > > sign-bit bit set, > > > > Is that guaranteed in all cases? Also at -O0, also for args bigger > > than 64 bits? > > val_signbit_known_clear_p should work for any size/precision arg. No, you're right! Please forgive/excuse me. Neither val_signbit_p nor nonzero_bits have yet been updated to use "wide_int", so don't work for TImode or wider modes. Doh! I'm shocked. Roger --