public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/67061] sh64-elf: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235
Date: Sat, 01 Aug 2015 00:12:00 -0000	[thread overview]
Message-ID: <bug-67061-4-xPFVskfdrn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-67061-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Kazumoto Kojima from comment #2)
> 
> where reg is r2 and curr_insn is the insn 31.  sh_find_set_of_reg is
> stepping backward from the insn 31 but the call_insn 29 is missed.
> 
> Does the patch below work?
> 
> Oleg, it's the same one we've discussed, I think.  Thought?

Same function, different problem, and all are true :)

The previous issue was that sh_find_set_of_reg does not check if an insn
clobbers the searched reg.  Usually set_of will find a regular clobber in the
insn.  For calls that clobber some hardregs it doesn't work.  This requires
additional calls to 'modified_in_p'.

This issue here is that it doesn't understand that the call_insn sets the
searched reg.  Your patch works for this particular case, but I think the
better fix for this would be to just use INSN_P instead of NONJUMP_INSN_P. 
Then we don't need the REGNO check.

I've planted the assert (which got us here) to catch inconsistencies of the
return value.  Even if sh_find_set_of_reg skips over the the call_insn because
of the !NONJUMP_INSN_P, the return value should be consistent.  So there is
another problem.  I'll work on a patch for that.


  parent reply	other threads:[~2015-08-01  0:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  0:36 [Bug target/67061] New: " yselkowi at redhat dot com
2015-07-30  3:45 ` [Bug target/67061] " olegendo at gcc dot gnu.org
2015-07-30  4:50 ` kkojima at gcc dot gnu.org
2015-07-31 15:27 ` yselkowi at redhat dot com
2015-08-01  0:12 ` olegendo at gcc dot gnu.org [this message]
2015-09-13 13:49 ` olegendo at gcc dot gnu.org
2015-09-13 21:53 ` olegendo at gcc dot gnu.org
2015-09-20 10:19 ` olegendo at gcc dot gnu.org
2015-09-20 10:21 ` olegendo 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-67061-4-xPFVskfdrn@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).