From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DAE753858C60; Wed, 15 Feb 2023 10:38:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAE753858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676457528; bh=arj6FHgfp0n1gAAaKUH5han4CjF8X3unWSP2ZKYDJPM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bc/aVkAOEsPkBFzRGPJnKRbBDEwCAElrQxI2ipLWgNVYDAgdIP15tN2BhtcCgLC6L 3zDxbiczXKU9YALUZ6CChWTLbQszavtfIemt08oXQ92AhFRwxGU0ej4Jwl5/gbr2tc DRnJZM7BagfP8R43XHE6RitJjO2ICTa49xTNccYI= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/108679] [13 Regression] ice in modify_call, at ipa-param-manipulation.cc:656 since r13-4685-g4834e9360f7bf42f Date: Wed, 15 Feb 2023 10:38:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jamborm at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D108679 --- Comment #5 from CVS Commits --- The master branch has been updated by Martin Jambor : https://gcc.gnu.org/g:8b1b1b2d691d5cee4ebc40a01974ad5bccab22f9 commit r13-6003-g8b1b1b2d691d5cee4ebc40a01974ad5bccab22f9 Author: Martin Jambor Date: Wed Feb 15 11:38:01 2023 +0100 ipa: Avoid IPA confusing scalar values and single-field aggregates (PR 108679) PR 108679 testcase shows a situation when IPA-CP is able to track a scalar constant in a single-field structure that is part of a bigger structure. This smaller structure is however also passed in a few calls to other functions, but the two same-but-different entities, originally placed at the same offset and with the same size, confuse the mechanism that takes care of handling call statements after IPA-SRA. I think that in stage 4 it is best to revert to GCC 12 behavior in this particular case (when IPA-CP detects a constant in a single-field structure or a single element array that is part of a bigger aggregate) and the patch below does that. If accepted, I plan to file a missed-optimization bug to track that we could use the IPA-CP propagated value to re-construct the small aggregate arguments. gcc/ChangeLog: 2023-02-13 Martin Jambor PR ipa/108679 * ipa-sra.cc (push_param_adjustments_for_index): Do not omit creation of non-scalar replacements even if IPA-CP knows their contents. gcc/testsuite/ChangeLog: 2023-02-13 Martin Jambor PR ipa/108679 * gcc.dg/ipa/pr108679.c: New test.=