public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "amodra at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/61231] [4.9/4.10 Regression] bootstrap comparision failure on powerpc64le-linux-gnu
Date: Wed, 21 May 2014 07:49:00 -0000	[thread overview]
Message-ID: <bug-61231-4-tp9BErlg9I@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61231-4@http.gcc.gnu.org/bugzilla/>

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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-05-21
                 CC|                            |amodra at gmail dot com
           Assignee|unassigned at gcc dot gnu.org      |amodra at gmail dot com
     Ever confirmed|0                           |1

--- Comment #9 from Alan Modra <amodra at gmail dot com> ---
So, what's happening here on the testcase is that before r210519, from the ira
dump for pseudo reg 171 we have

a15 (r171,l0) best GENERAL_REGS, allocno GENERAL_REGS

a15(r171,l0) costs: BASE_REGS:0,0 GENERAL_REGS:0,0 NON_SPECIAL_REGS:3264,3264
LINK_REGS:1224,1224 CTR_REGS:1224,1224 LINK_OR_CTR_REGS:1224,1224
SPECIAL_REGS:1224,1224 SPEC_OR_GEN_REGS:1224,1224 NON_FLOAT_REGS:4896,4896
ALL_REGS:4896,4896 MEM:0,0

and after

a15 (r171,l0) best NO_REGS, allocno NO_REGS

a15(r171,l0) costs: BASE_REGS:0,0 GENERAL_REGS:0,0 NON_SPECIAL_REGS:1224,1224
LINK_REGS:1224,1224 CTR_REGS:1224,1224 LINK_OR_CTR_REGS:1224,1224
SPECIAL_REGS:1224,1224 SPEC_OR_GEN_REGS:1224,1224 NON_FLOAT_REGS:2448,2448
ALL_REGS:2448,2448 MEM:-320,-320

(hmm, negative cost, is that really allowed??)

Going into reload, both before and after r210519, we have

(insn 57 60 59 10 (set (reg:SI 171 [ MEM[(char * {ref-all})data_p_9(D) + 2B] ])
        (mem:SI (plus:DI (reg/v/f:DI 151 [ data_p ])
                (const_int 2 [0x2])) [0 MEM[(char * {ref-all})data_p_9(D) +
2B]+0 S4 A8])) /src/tmp/pr61231.ii:68 442 {*movsi_internal1}
     (expr_list:REG_EQUIV (mem:SI (plus:DI (reg/v/f:DI 151 [ data_p ])
                (const_int 2 [0x2])) [0 MEM[(char * {ref-all})data_p_9(D) +
2B]+0 S4 A8])
        (nil)))
(insn 59 57 61 10 (set (reg:DI 3 3)
        (sign_extend:DI (reg:SI 171 [ MEM[(char * {ref-all})data_p_9(D) + 2B]
]))) /src/tmp/pr61231.ii:68 29 {*extendsidi2_nocell}
     (expr_list:REG_DEAD (reg:SI 171 [ MEM[(char * {ref-all})data_p_9(D) + 2B]
])
        (nil)))

So before r210519, reload puts reg 171 into a gpr and we keep both insn 57
(which results in lwz) and insn 59 (which results in extsw).  After r210519,
insn 57 is deleted because reg 171 has an equivalent mem, and the mem from insn
57 is inserted into insn 59.  This matches the "m" constraint on
extendsidi2_nocell so reload thinks everything is good.  THE lwa_operand
PREDICATE IS NOT CHECKED AGAIN!  Which is standard reload behaviour..

This is a bug in rs6000.md.  extendsidi2_nocell ought to be using the "Y"
constraint, and there needs to be a small modification to mem_operand_gpr to
make it work with SImode.


  parent reply	other threads:[~2014-05-21  7:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 12:36 [Bug target/61231] New: " doko at gcc dot gnu.org
2014-05-19 12:49 ` [Bug target/61231] " rguenth at gcc dot gnu.org
2014-05-19 16:27 ` doko at gcc dot gnu.org
2014-05-19 18:40 ` fche at redhat dot com
2014-05-20 10:32 ` doko at gcc dot gnu.org
2014-05-20 10:59 ` fche at redhat dot com
2014-05-20 15:17 ` doko at gcc dot gnu.org
2014-05-20 15:42 ` bergner at gcc dot gnu.org
2014-05-20 15:45 ` bergner at gcc dot gnu.org
2014-05-21  7:49 ` amodra at gmail dot com [this message]
2014-05-21 15:14 ` vmakarov at gcc dot gnu.org
2014-05-22 15:37 ` bergner at gcc dot gnu.org
2014-05-22 17:41 ` vmakarov at gcc dot gnu.org
2014-05-23  1:18 ` amodra at gcc dot gnu.org
2014-05-23  1:24 ` amodra at gcc dot gnu.org
2014-05-23  1:29 ` amodra at gcc dot gnu.org
2014-06-25 11:07 ` jakub at gcc dot gnu.org
2014-06-25 11:37 ` doko 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-61231-4-tp9BErlg9I@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).