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 target/97457] [10/11 Regression] SVE: wrong code since r10-4752-g2d56600c
Date: Wed, 28 Oct 2020 19:06:16 +0000	[thread overview]
Message-ID: <bug-97457-4-w4pmFmsLvc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97457-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:54ef7701a9dec8c923a12d1983f8a051ba88a7b9

commit r11-4495-g54ef7701a9dec8c923a12d1983f8a051ba88a7b9
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Wed Oct 28 19:05:49 2020 +0000

    value-range: Give up on POLY_INT_CST ranges [PR97457]

    This PR shows another problem with calculating value ranges for
    POLY_INT_CSTs.  We have:

      ivtmp_76 = ASSERT_EXPR <ivtmp_60, ivtmp_60 > POLY_INT_CST [9,
4294967294]>

    where the VQ coefficient is unsigned but is effectively acting
    as a negative number.  We wrongly give the POLY_INT_CST the range:

      [9, INT_MAX]

    and things go downhill from there: later iterations of the unrolled
    epilogue are wrongly removed as dead.

    I guess this is the final nail in the coffin for doing VRP on
    POLY_INT_CSTs.  For other similarly exotic testcases we could have
    overflow for any coefficient, not just those that could be treated
    as contextually negative.

    Testing TYPE_OVERFLOW_UNDEFINED doesn't seem like an option because we
    couldn't handle warn_strict_overflow properly.  At this stage we're
    just recording a range that might or might not lead to strict-overflow
    assumptions later.

    It still feels like we should be able to do something here, but for
    now removing the code seems safest.  It's also telling that there
    are no testsuite failures on SVE from doing this.

    gcc/
            PR tree-optimization/97457
            * value-range.cc (irange::set): Don't decay POLY_INT_CST ranges
            to integer ranges.

    gcc/testsuite/
            PR tree-optimization/97457
            * gcc.dg/vect/pr97457.c: New test.

  parent reply	other threads:[~2020-10-28 19:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 11:51 [Bug target/97457] New: " acoplan at gcc dot gnu.org
2020-10-16 11:52 ` [Bug target/97457] " acoplan at gcc dot gnu.org
2020-10-16 11:57 ` acoplan at gcc dot gnu.org
2020-10-16 15:25 ` acoplan at gcc dot gnu.org
2020-10-27 17:35 ` rsandifo at gcc dot gnu.org
2020-10-28 19:06 ` cvs-commit at gcc dot gnu.org [this message]
2020-12-02 18:39 ` [Bug target/97457] [10 " cvs-commit at gcc dot gnu.org
2020-12-02 18:42 ` rsandifo at gcc dot gnu.org
2020-12-30 14:41 ` rsandifo 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-97457-4-w4pmFmsLvc@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).