From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 4C69D3858CDB for ; Mon, 26 Feb 2024 15:56:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4C69D3858CDB 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 4C69D3858CDB 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=1708962996; cv=none; b=Vj83efUV/PfoZBXITBe3tww96bNEx2w66v5Mybd5cQ4jzCT+uwXQwk4b02Th0tnyByQisXzgzUiZg+fUlxY/w7BztJeoflWbSP9Xlz4o4oRAxRLWf5uAJlZtQ86x3vqKv+keBEPMZNKVofQnWAhv5jdgHVZOqHWVRKPhywpLABI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708962996; c=relaxed/simple; bh=JGSS6/Ig+4oiCVrdLVLFMFwKS2Ubw39ED7s39DjHmjs=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=JkknZs/NiHfYMH/kcJ1k3m6joFQGqDbSpFhqvOUWgv0zm9YJt07T20tYPQiyQ+6qB6a4ptKAJyrD0s85LLev0EjFm12Le/Jk7ewp8PvbZDVUMnYIqWE9caOh7LHdHx9ylcZINovtaVm2piQpPTCfEWRIkoFnwUaugzanxacBE4c= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708962994; 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=xNlQSTzE3paraqMavu8UjduX2LXQc7TvL8w9c6gAC/c=; b=BPD8ingzAI6NiDU0yMmYPWypuJ5I1lrtPk5wuT/tMpUWQEReSCWugdJTLdwQx+XKhMuqEF Bh5WsuAglRBzvouBXa1o3DlxhiDfP0mBUWQfQgZMjfUqNaM+vM5pakSghDkEkrC2o/XCiu oN0EmmO1Eznlm+AuGigF/Yz9NTRyqNY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-596-Hto5g2voPxK1e0T4yIN6DQ-1; Mon, 26 Feb 2024 10:56:33 -0500 X-MC-Unique: Hto5g2voPxK1e0T4yIN6DQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id DC2BA10AFB86; Mon, 26 Feb 2024 15:56:32 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9B4AD6333A; Mon, 26 Feb 2024 15:56:32 +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 41QFuTWn1360998 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 16:56:30 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 41QFuTfg1360997; Mon, 26 Feb 2024 16:56:29 +0100 Date: Mon, 26 Feb 2024 16:56:28 +0100 From: Jakub Jelinek To: Michael Matz Cc: Richard Biener , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] tree-optimization/114074 - CHREC multiplication and undefined overflow Message-ID: Reply-To: Jakub Jelinek References: <83476.124022609150401789@us-mta-131.us.mimecast.lan> <12937df3-5d06-dd50-9ebf-254a6e952080@suse.de> MIME-Version: 1.0 In-Reply-To: <12937df3-5d06-dd50-9ebf-254a6e952080@suse.de> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.4 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,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Feb 26, 2024 at 04:51:08PM +0100, Michael Matz wrote: > On Mon, 26 Feb 2024, Jakub Jelinek wrote: > > > > Will update the patch, I think any improvement should be done > > > to get_range_pos_neg (it's a bit odd in behavior for unsigned > > > but I have only signed things incoming). > > > > For unsigned if it always returned 1, it would be quite useless, there would > > be no point for the caller to call it in that case. > > Which seems to make sense for a function called ...pos_neg on unsigned > types. I would expect calling it to be useless and always return "yep, > non-negative, why did you ask?". The callers heavily rely on it doing for unsigned types what it does now and it matches what the function comment says. If you have a suggestion for a different name that wouldn't be much longer than the current one, it can be renamed. get_msb_range? Except it doesn't return a range for the most significant bit, but a bitmask which values are possible. Jakub