From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D9EEA3858409; Fri, 3 Feb 2023 12:30:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9EEA3858409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675427426; bh=ioEuuFGrmJkunKRPSkE1nJ2u5385D37lvghovLLV73I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Q+66tdmirkRGaLLzgn4sgjQOwEJ1cgDciwwdJo333B2id6416u7WpRIhysjAO6F/B lTBohxNrNaBmUPba3evksHI558pI0NVk8ae3hhPpdTpZSP4x9bUlcREC7M5DF+WNwJ WAhat13Qg+MmIXK19D7YHCJ1GXrWh4jP/5CTazPo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBpcGEvMTA4Mzg0XSBbMTMgUmVncmVzc2lvbl0gZXJyb3I6?= =?UTF-8?B?IGNvbnZlcnNpb24gb2YgcmVnaXN0ZXIgdG8gYSBkaWZmZXJlbnQgc2l6ZSBp?= =?UTF-8?B?biDigJh2aWV3X2NvbnZlcnRfZXhwcuKAmQ==?= Date: Fri, 03 Feb 2023 12:30:23 +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-checking, 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=3D108384 --- Comment #14 from CVS Commits --- The master branch has been updated by Martin Jambor : https://gcc.gnu.org/g:e8109bd87766be88e83fe88a44433dae16358a02 commit r13-5681-ge8109bd87766be88e83fe88a44433dae16358a02 Author: Martin Jambor Date: Fri Feb 3 13:28:24 2023 +0100 ipa: Avoid invalid gimple when IPA-CP and IPA-SRA disagree on types (108384) When the compiled program contains type mismatches between callers and callees when it comes to a parameter, IPA-CP can try to propagate one constant from callers while IPA-SRA may try to split a parameter expecting a value of a different size on the same offset. This then currently leads to creation of a VIEW_CONVERT_EXPR with mismatching type sizes of LHS and RHS which is correctly flagged by the GIMPLE verifier as invalid. It seems that the best course of action is to try and avoid the situation altogether and so this patch adds a check to IPA-SRA that peeks into the result of IPA-CP and when it sees a value on the same offset but with a mismatching size, it just decides to leave that particular parameter be. gcc/ChangeLog: 2023-02-02 Martin Jambor PR ipa/108384 * ipa-sra.cc (push_param_adjustments_for_index): Remove a size check when comparing to an IPA-CP value. (dump_list_of_param_indices): New function. (adjust_parameter_descriptions): Check for mismatching IPA-CP values. Dump removed candidates using dump_list_of_param_indices. * ipa-param-manipulation.cc (ipa_param_body_adjustments::modify_expression): Add assert checking sizes of a VIEW_CONVERT_EXPR will match. (ipa_param_body_adjustments::modify_assignment): Likewise. gcc/testsuite/ChangeLog: 2023-02-02 Martin Jambor PR ipa/108384 * gcc.dg/ipa/pr108384.c: New test.=