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/99648] [11 regression] gcc.dg/torture/pr71522.c fails starting with r11-165 for 32 bits
Date: Tue, 13 Apr 2021 07:42:07 +0000	[thread overview]
Message-ID: <bug-99648-4-E65r2mI3N2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99648-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

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

commit r11-8146-gc0f772894b6b3cd8ed5c5dd09d0c7917f51cf70f
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Apr 13 09:41:20 2021 +0200

    simplify-rtx: Punt on simplify_{,gen_}subreg to IBM double double if bits
are lost [PR99648]

    Similarly to PR95450 done on GIMPLE, this patch punts if we try to
    simplify_{gen_,}subreg from some constant into the IBM double double
    IFmode (or sometimes TFmode) if the double double format wouldn't preserve
    the bits.  Not all values are valid in IBM double double, e.g. the format
    requires that the upper double is the whole value rounded to double, and
    if in some cases such as in the pr71522.c testcase with -m32 -Os
-mcpu=power7
    some non-floating data is copied through long double variable, we can
    simplify a subreg into something that has different value.

    Fixed by punting if the planned simplify_immed_subreg result doesn't
    encode to bitwise identical values compared to what we were decoding.

    As for the simplify_gen_subreg change, I think it would be desirable
    to just avoid creating SUBREGs of constants on all targets and for all
    constants, if simplify_immed_subreg simplified, fine, otherwise punt,
    but as we are late in GCC11 development, the patch instead guards this
    behavior on MODE_COMPOSITE_P (outermode) - i.e. only conversions to
    powerpc{,64,64le} double double long double - and only for the cases where
    simplify_immed_subreg was called.

    2021-04-13  Jakub Jelinek  <jakub@redhat.com>

            PR target/99648
            * simplify-rtx.c (simplify_immed_subreg): For MODE_COMPOSITE_P
            outermode, return NULL if the result doesn't encode back to the
            original byte sequence.
            (simplify_gen_subreg): Don't create SUBREGs from constants to
            MODE_COMPOSITE_P outermode.

  parent reply	other threads:[~2021-04-13  7:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 15:31 [Bug other/99648] New: " seurer at gcc dot gnu.org
2021-03-18 16:42 ` [Bug other/99648] " jakub at gcc dot gnu.org
2021-03-19  7:39 ` [Bug target/99648] " rguenth at gcc dot gnu.org
2021-03-30 20:01 ` seurer at gcc dot gnu.org
2021-03-30 20:06 ` seurer at gcc dot gnu.org
2021-03-31  7:41 ` rguenth at gcc dot gnu.org
2021-04-09 16:48 ` jakub at gcc dot gnu.org
2021-04-09 17:42 ` jakub at gcc dot gnu.org
2021-04-12  6:44 ` rguenth at gcc dot gnu.org
2021-04-12  9:10 ` jakub at gcc dot gnu.org
2021-04-12 10:27 ` jakub at gcc dot gnu.org
2021-04-12 11:30 ` rguenth at gcc dot gnu.org
2021-04-12 11:34 ` jakub at gcc dot gnu.org
2021-04-13  7:42 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-13  7:42 ` jakub 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-99648-4-E65r2mI3N2@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).