public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99540] [10/11 Regression] ICE: Segmentation fault in aarch64_add_offset
Date: Fri, 19 Mar 2021 12:03:43 +0000	[thread overview]
Message-ID: <bug-99540-4-OcbaFQtiAL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99540-4@http.gcc.gnu.org/bugzilla/>

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Given that Richard's change was just an optimization, perhaps we can just do:
--- gcc/config/aarch64/aarch64.c.jj     2021-03-19 10:14:18.302936161 +0100
+++ gcc/config/aarch64/aarch64.c        2021-03-19 12:58:32.454131746 +0100
@@ -4636,7 +4636,7 @@ aarch64_add_offset (scalar_int_mode mode
          val = gen_int_mode (poly_int64 (low_bit * 2, low_bit * 2), mode);
          val = aarch64_force_temporary (mode, temp1, val);

-         if (can_create_pseudo_p ())
+         if (can_create_pseudo_p () && !flag_trapv)
            {
              rtx coeff1 = gen_int_mode (factor, mode);
              val = expand_mult (mode, val, coeff1, NULL_RTX, false, true);


Or

--- gcc/config/aarch64/aarch64.c.jj     2021-03-19 10:14:18.302936161 +0100
+++ gcc/config/aarch64/aarch64.c        2021-03-19 13:03:07.109102334 +0100
@@ -4639,7 +4639,10 @@ aarch64_add_offset (scalar_int_mode mode
          if (can_create_pseudo_p ())
            {
              rtx coeff1 = gen_int_mode (factor, mode);
+             bool saved_trapv = flag_trapv;
+             flag_trapv = false;
              val = expand_mult (mode, val, coeff1, NULL_RTX, false, true);
+             flag_trapv = saved_trapv;
            }
          else
            {

  parent reply	other threads:[~2021-03-19 12:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11  4:31 [Bug target/99540] New: " asolokha at gmx dot com
2021-03-11  9:00 ` [Bug target/99540] [10/11 Regression] " ktkachov at gcc dot gnu.org
2021-03-11 17:13 ` acoplan at gcc dot gnu.org
2021-03-19 11:58 ` acoplan at gcc dot gnu.org
2021-03-19 12:03 ` jakub at gcc dot gnu.org [this message]
2021-03-19 12:05 ` jakub at gcc dot gnu.org
2021-03-19 12:37 ` jakub at gcc dot gnu.org
2021-03-19 12:37 ` jakub at gcc dot gnu.org
2021-03-19 12:43 ` rsandifo at gcc dot gnu.org
2021-03-23 14:02 ` cvs-commit at gcc dot gnu.org
2021-03-24 19:19 ` [Bug target/99540] [10 " cvs-commit at gcc dot gnu.org
2021-03-30 15:34 ` rsandifo at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-15 16:51 ` acoplan at gcc dot gnu.org
2021-04-15 17:02 ` rsandifo at gcc dot gnu.org
2021-04-23 16:34 ` [Bug target/99540] " 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-99540-4-OcbaFQtiAL@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).