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/110753] [14 Regression] ICE in meet_with_1, at ipa-cp.cc:1057
Date: Fri, 18 Aug 2023 15:39:21 +0000	[thread overview]
Message-ID: <bug-110753-4-sSNiy8AThF@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110753-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Aldy Hernandez <aldyh@gcc.gnu.org>:

https://gcc.gnu.org/g:53fcd3bdbc9104a8acdc79134d8d272d7eead0fd

commit r14-3326-g53fcd3bdbc9104a8acdc79134d8d272d7eead0fd
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Fri Aug 18 12:41:46 2023 +0200

    [irange] Return FALSE if updated bitmask is unchanged [PR110753]

    The mask/value pair we track in the irange is a bit fickle in that it
    can sometimes contradict the bitmask inherent in the range.  This can
    happen when a series of calculations yield a combination such as:

            [3, 1000] MASK 0xfffffffe VALUE 0x0

    The mask/value above implies that the lowest bit is a known 0, which
    would exclude the 3 in the range.  At one time we tried keeping mask
    and ranges 100% consistent, but the performance penalty was too high
    (5% in VRP).  Also, it's unclear whether the intersection of two
    incompatible known bits should make the whole range undefined, or
    just the contradicting bits.  This is all documented in
    irange::get_bitmask().  We could revisit both of these assumptions
    in the future.

    In this testcase IPA ends up with a range where the lower 2 bits are
    expected to be 0, but the range is [1,1].

            [irange] long int [1, 1] MASK 0xfffffffffffffffc VALUE 0x0

    This causes irange::union_bitmask() to think an update occurred, when
    no semantic change happened, thus triggering an assert in IPA-cp.  We
    could get rid of the assert, but it's cleaner to make
    irange::{union,intersect}_bitmask always tell the truth.  Beside, the
    ranger's cache also depends on union being truthful.

            PR ipa/110753

    gcc/ChangeLog:

            * value-range.cc (irange::union_bitmask): Return FALSE if updated
            bitmask is semantically equivalent to the original mask.
            (irange::intersect_bitmask): Same.
            (irange::get_bitmask): Add comment.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/pr110753.c: New test.

  parent reply	other threads:[~2023-08-18 15:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 16:09 [Bug c/110753] New: " shaohua.li at inf dot ethz.ch
2023-07-20 16:19 ` [Bug ipa/110753] [14 Regression] " pinskia at gcc dot gnu.org
2023-07-30 20:45 ` shaohua.li at inf dot ethz.ch
2023-08-03  9:10 ` aldyh at gcc dot gnu.org
2023-08-18 15:39 ` cvs-commit at gcc dot gnu.org [this message]
2023-08-18 15:42 ` aldyh 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-110753-4-sSNiy8AThF@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).