public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/108384] [13 Regression] error: conversion of register to a different size in ‘view_convert_expr’
Date: Fri, 03 Feb 2023 12:30:23 +0000	[thread overview]
Message-ID: <bug-108384-4-8XGVRbCFI6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108384-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108384

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamborm@gcc.gnu.org>:

https://gcc.gnu.org/g:e8109bd87766be88e83fe88a44433dae16358a02

commit r13-5681-ge8109bd87766be88e83fe88a44433dae16358a02
Author: Martin Jambor <mjambor@suse.cz>
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  <mjambor@suse.cz>

            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  <mjambor@suse.cz>

            PR ipa/108384
            * gcc.dg/ipa/pr108384.c: New test.

  parent reply	other threads:[~2023-02-03 12:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 14:53 [Bug c/108384] New: " dcb314 at hotmail dot com
2023-01-12 14:56 ` [Bug c/108384] " dcb314 at hotmail dot com
2023-01-12 16:11 ` [Bug ipa/108384] " pinskia at gcc dot gnu.org
2023-01-12 16:26 ` dcb314 at hotmail dot com
2023-01-12 17:05 ` dcb314 at hotmail dot com
2023-01-12 17:14 ` dcb314 at hotmail dot com
2023-01-12 17:19 ` dcb314 at hotmail dot com
2023-01-12 17:35 ` dcb314 at hotmail dot com
2023-01-12 18:32 ` dcb314 at hotmail dot com
2023-01-12 19:29 ` [Bug ipa/108384] [13 Regression] " pinskia at gcc dot gnu.org
2023-01-12 19:30 ` jakub at gcc dot gnu.org
2023-01-12 19:43 ` pinskia at gcc dot gnu.org
2023-01-12 21:11 ` jamborm at gcc dot gnu.org
2023-01-13  7:26 ` rguenth at gcc dot gnu.org
2023-02-02 16:20 ` jamborm at gcc dot gnu.org
2023-02-03 12:30 ` cvs-commit at gcc dot gnu.org [this message]
2023-02-03 12:33 ` jamborm at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-108384-4-8XGVRbCFI6@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).