public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vmakarov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99422] [11 Regression] ICE in extract_constrain_insn building glibc pthread_create
Date: Thu, 11 Mar 2021 21:34:45 +0000	[thread overview]
Message-ID: <bug-99422-4-oeyds3Mn10@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99422-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #26 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Here are my findings.

Before the patches function process_address_1 used CONSTRAINT__UNKNOWN (taken
from '=' of constraint "=T,..." and this is wrong) to check validity address. 
It was invalid and LRA added reloads for the address.

After the patches, the function uses CONTSTRAINT_T (taken from 'T').  For
constraint T sparc code says that the memory address is ok and LRA keeps the
address and does not generate reloads.

That is wrong.  Sparc code should say LRA that the address is wrong.  Function
sparc.c:memory_ok_for_ldd is responsible for this.

If I apply the following patch

diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c                
index f1504172022..ac83f900964 100644                                           
--- a/gcc/config/sparc/sparc.c                                                  
+++ b/gcc/config/sparc/sparc.c                                                  
@@ -9230,6 +9230,9 @@ memory_ok_for_ldd (rtx op)                                
   if (! can_create_pseudo_p ()                                                 
       && !strict_memory_address_p (Pmode, XEXP (op, 0)))                       
     return 0;                                                                  
+  if (can_create_pseudo_p ()                                                   
+      && !memory_address_p (Pmode, XEXP (op, 0)))                              
+    return 0;                                                                  

   return 1;
 }

the problem is gone.

I think target code is responsible for the bug and fix should be there not in
LRA.

  parent reply	other threads:[~2021-03-11 21:34 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-06  1:31 [Bug target/99422] New: " jsm28 at gcc dot gnu.org
2021-03-06  9:51 ` [Bug target/99422] " jakub at gcc dot gnu.org
2021-03-06  9:51 ` jakub at gcc dot gnu.org
2021-03-06 10:08 ` jakub at gcc dot gnu.org
2021-03-06 18:57 ` dcb314 at hotmail dot com
2021-03-07  2:27 ` pinskia at gcc dot gnu.org
2021-03-07  2:28 ` pinskia at gcc dot gnu.org
2021-03-07 19:01 ` vmakarov at gcc dot gnu.org
2021-03-07 19:49 ` vmakarov at gcc dot gnu.org
2021-03-07 20:34 ` pinskia at gcc dot gnu.org
2021-03-07 21:00 ` pinskia at gcc dot gnu.org
2021-03-08 14:26 ` cvs-commit at gcc dot gnu.org
2021-03-08 14:31 ` vmakarov at gcc dot gnu.org
2021-03-08 18:53 ` ro at gcc dot gnu.org
2021-03-08 18:58 ` vmakarov at gcc dot gnu.org
2021-03-08 19:05 ` vmakarov at gcc dot gnu.org
2021-03-08 19:33 ` gerald at pfeifer dot com
2021-03-08 20:45 ` raj.khem at gmail dot com
2021-03-08 21:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
2021-03-10 14:06 ` ro at gcc dot gnu.org
2021-03-10 16:10 ` ebotcazou at gcc dot gnu.org
2021-03-10 18:46 ` vmakarov at gcc dot gnu.org
2021-03-10 21:16 ` cvs-commit at gcc dot gnu.org
2021-03-10 21:21 ` vmakarov at gcc dot gnu.org
2021-03-11  9:44 ` ro at CeBiTec dot Uni-Bielefeld.DE
2021-03-11 10:13 ` ebotcazou at gcc dot gnu.org
2021-03-11 19:11 ` vmakarov at gcc dot gnu.org
2021-03-11 21:34 ` vmakarov at gcc dot gnu.org [this message]
2021-03-11 23:38 ` ebotcazou at gcc dot gnu.org
2021-03-12 17:52 ` cvs-commit at gcc dot gnu.org
2021-03-16 10:36 ` jakub at gcc dot gnu.org
2021-03-16 19:26 ` jakub at gcc dot gnu.org
2021-03-18 19:59 ` cvs-commit 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-99422-4-oeyds3Mn10@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).