public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rearnsha at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/15342] [arm-linux] internal compiler error: in verify_local_live_at_start
Date: Fri, 29 Oct 2004 16:44:00 -0000	[thread overview]
Message-ID: <20041029164410.20070.qmail@sourceware.org> (raw)
In-Reply-To: <20040508184142.15342.pb@gcc.gnu.org>


------- Additional Comments From rearnsha at gcc dot gnu dot org  2004-10-29 16:43 -------
I think the key to what has failed here is that the reg-rename pass has missed
the equivalence between start->index and a member of the copied structure.

In pseudo code, the output from the previous pass has the following instructions

	r2 := [ip+8]/4
	cc := cmp r2, #0
ne(cc):	r0, r1, r2 := [r0]/12
ne(cc):	[ip]/12 := r0, r1, r2   // Note [ip+8]/4 set to new r2 ...
	cc := cmp r2, #1        // ...so no need to reload it here
gt(cc): r3 := #0
gt(cc): [ip+8]/4 := r3
	return

Note that r2 is updated by the first conditional instruction (a conditional ldm
on ARM).  The conditional move code on ARM uses hard registers, but CSE has
clearly noticed this equivalence at some point and merged the two uses to avoid
a redundant re-load of start->index.  Unfortunately, rename_registers has missed
this and split the two uses up again.  This creates a use of r2 when it isn't
correctly initialized.

	r1 := [ip+8]/4
	cc := cmp r1, #0
ne(cc):	r0, r1, r2 := [r0]/12
ne(cc):	[ip]/12 := r0, r1, r2
	cc := cmp r2, #1        // r2 incorrect if previous insn not exec
gt(cc): r3 := #0
gt(cc): [ip+8]/4 := r3
	return

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |rtl-optimization


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15342


  parent reply	other threads:[~2004-10-29 16:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-08 18:41 [Bug target/15342] New: " pb at gcc dot gnu dot org
2004-05-08 18:42 ` [Bug target/15342] " pb at gcc dot gnu dot org
2004-05-08 21:51 ` belyshev at lubercy dot com
2004-05-09 13:59 ` belyshev at lubercy dot com
2004-05-09 15:25 ` pinskia at gcc dot gnu dot org
2004-10-29 16:44 ` rearnsha at gcc dot gnu dot org [this message]
2004-11-04 14:08 ` [Bug rtl-optimization/15342] " cvs-commit at gcc dot gnu dot org
2005-01-23 23:47 ` pinskia at gcc dot gnu dot org
2005-01-23 23:48 ` pinskia at gcc dot gnu dot org
2005-09-01 13:09 ` cvs-commit at gcc dot gnu dot org
2005-09-01 13:14 ` rearnsha at gcc dot gnu dot org
2005-09-01 13:15 ` pinskia at gcc dot gnu dot 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=20041029164410.20070.qmail@sourceware.org \
    --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).