From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 68B313858D38; Thu, 23 May 2024 03:29:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68B313858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716434989; bh=jIZtRBlc8Y8BuNECNsJjFfVps6euxOPM6mipQCdklMw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tPe1Tr+7Km+ZanIdoCkcAbNEuB3sWxc3NVIsQtNV1qGOKu1GEYEb6fT8DLb7aK9sr LgpUSXlMBmP6YwJCjCMMxGWkGVI0EhdAYlJ4vNYbWA4tGRv3IMvxM1Q7RkLDlw/GR9 jTr+DVF6M59UIPUkSCIQeDVCFoLfHpRIxTvxwzPM= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/115201] Recursion not optimized for structs arguments Date: Thu, 23 May 2024 03:29:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.1.1 X-Bugzilla-Keywords: FIXME, missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115201 --- Comment #8 from Andrew Pinski --- (In reply to Andrew Pinski from comment #7) > /* The parameter should be a real operand, so that phi node > created for it at the start of the function has the meaning > of copying the value. This test implies is_gimple_reg_type > from the previous condition, however this one could be > relaxed by being more careful with copying the new value > of the parameter (emitting appropriate GIMPLE_ASSIGN and > updating the virtual operands). */ >=20 > So this has been a known issue for a long time now. Actually this is the correct one: /* Make sure there are no problems with copying. The paramet= er have a copyable type and the two arguments must have reasonably equivalent types. The latter requirement could be relaxed= if we emitted a suitable type conversion statement. */ That has been there since tree-ssa was merged in.=