From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id 37C89385803E for ; Mon, 22 Jan 2024 17:02:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 37C89385803E Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kam.mff.cuni.cz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 37C89385803E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705942975; cv=none; b=kl1OyWZ1Sx/5ej/E9gugaQxOiVAdF2tKKqnoZdytOZ4t7fS/fnxfkxuRD+O9Zli9Z9NC21fuPd8ovht9o55Z8fD7KvqKAgkJQ+iPgrwwQ0Id5bRiwKJ2QWzn8AeMCdJL+60QjPRnOsgIw/Ym8ksBfj70tUkyLWS0/NgnPEagGmw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705942975; c=relaxed/simple; bh=9SvLXsjZjGqhz7uF0m9x0qf5x+z30v6jSMmBH0ozSik=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=UClx5V2cBonU5Pj2IBDPCC+4Q5uK2viUs+YsK95voO9i5e7+kU8pe77E3RemXkBva2JBODkRrCQJRWNtnF580Z0j7WgaEQQpEHTj7VqWZ+QfJKF97E96Wl1judB9EE3mr5Rhzkoo5aEJMFg4R8TU3xLHYYex5PskIcnDTR9HhnM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 52FD5283AE8; Mon, 22 Jan 2024 18:02:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1705942973; h=from:from: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=+4UtZdOFygto4aun31ZBuqVMGpKvIDCmL2oNbDSH97I=; b=oQSCfJSEDi15Ki9izHxGt2wUx+4DWyZSWuleCbpqhKTniz+uBB2AdrxM5J6SWK05yyRq8b DjN7mpINJYZmc5iXe6ipNEkn88suNsP3xYnxuLDva292fNZMGz8Sfi+0tSbleldhgaGKsc 2wqR00fXxO0CqmChcrrl+lwystfv+YU= Date: Mon, 22 Jan 2024 18:02:53 +0100 From: Jan Hubicka To: Martin Jambor Cc: GCC Patches Subject: Re: [PATCH] ipa-cp: Fix check for exceeding param_ipa_cp_value_list_size (PR 113490) Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SCC_BODY_URI_ONLY,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > Hi, > > When the check for exceeding param_ipa_cp_value_list_size limit was > modified to be ignored for generating values from self-recursive > calls, it should have been changed from equal to, to equals toor is > greater than. This omission manifests itself as PR 113490. > > When I examined the condition I also noticed that the parameter should > come from the callee rather than the caller, since the value list is > associated with the former and not the latter. In practice the limit > is of course very likely to be the same, but I fixed this aspect of > the condition too. I briefly audited all other uses of opt_for_fn in > ipa-cp.cc and all the others looked OK. > > Bootstrapped and tested on x86_64-linux. OK for master? > > Thanks, > > Martin > > > gcc/ChangeLog: > > 2024-01-19 Martin Jambor > > PR ipa/113490 > * ipa-cp.cc (ipcp_lattice::add_value): Bail out if value > count is equal or greater than the limit. Use the limit from the > callee. > > gcc/testsuite/ChangeLog: > > 2024-01-19 Martin Jambor > > PR ipa/113490 > * gcc.dg/ipa/pr113490.c: New test. OK, thanks! Honza