From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF69A3858438; Thu, 27 Apr 2023 10:31:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF69A3858438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682591486; bh=ZFg0D2Pi8RqsjFXf7FV2+qtUPXHSRDsBYsl19LIWzw4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wY16ikLwl5tfbmBSmc3Wbw1pJitaO+JiD9MIW3IL8gLrF8l3cfHPFNDZePAhHcNTk cblCVrk5SSIblvLYYbo3ZLu0nHjF/TqHqN3LAzJRj0A6SWit1YdgXieu+oq0E0a5Y1 lSqAaZP6KwEO7RFdERfhwWSGBM1Pqydn6Ht2/+Z8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/109607] IPA replaces stmt with invalid gimple Date: Thu, 27 Apr 2023 10:31:25 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth 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=3D109607 --- Comment #4 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:d89e23f27215fcd822994fb2fad17fcd31eef5e1 commit r14-295-gd89e23f27215fcd822994fb2fad17fcd31eef5e1 Author: Richard Biener Date: Wed Apr 26 13:05:44 2023 +0200 ipa/109607 - properly gimplify conversions introduced by IPA param manipulation The following addresses IPA param manipulation (through IPA SRA) replacing BIT_FIELD_REF <*this_8(D), 8, 56> with BIT_FIELD_REF (ISRA.814= ), 8, 56> which is supposed to be invalid GIMPLE (ISRA.814 is a register). There's currently insufficient checking in place to catch this in the IL verifier but I am working on that as part of fixing PR109594. The solution for the particular testcase I am running into this is to split the conversion to a separate stmt. Generally the modification phase is set up for this but the extra_stmts sequence isn't passed around everywhere. The following passes it to modify_expression from modify_assignment when rewriting the RHS. PR ipa/109607 * ipa-param-manipulation.h (ipa_param_body_adjustments::modify_expression): Add extra_stmts argument. * ipa-param-manipulation.cc (ipa_param_body_adjustments::modify_expression): Likewise. When we need a conversion and the replacement is a register split the conversion out. (ipa_param_body_adjustments::modify_assignment): Pass extra_stmts to RHS modify_expression. * g++.dg/torture/pr109607.C: New testcase.=