public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "georgjohann at web dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/32790]  New: REG_N_SETS holds wrong value
Date: Tue, 17 Jul 2007 10:00:00 -0000	[thread overview]
Message-ID: <bug-32790-11621@http.gcc.gnu.org/bugzilla/> (raw)

In ./gcc/regclass.c:reg_scan_mark_refs()

there is this source code:

    case SET:
      /* Count a set of the destination if it is a register.  */
      for (dest = SET_DEST (x);
           GET_CODE (dest) == SUBREG || GET_CODE (dest) == STRICT_LOW_PART
           || GET_CODE (dest) == ZERO_EXTEND;
           dest = XEXP (dest, 0))
        ;

This code counts the number of times a REG is changed (eventually used in
combine, reload, regrenumber, ...)

IMHO, the ZERO_EXTEND is a typo and should be a ZERO_EXTRACT, because (set
(zero_extract (reg foo bar)) are RTX that are actually generated in some
define_insn/define_expand insv (provided HAVE_insv) if the source deals with
bitfields.

As this code can already be seen in GCC 3.3.*, I guess this is not very
critical. But it leads to problems in a non-standard target (tricore) that uses
the information in REG_N_SETS().

Greets,

Georg-Johann Lay
georg.lay@hightec-rt.com


-- 
           Summary: REG_N_SETS holds wrong value
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: georgjohann at web dot de
 GCC build triplet: any
  GCC host triplet: any
GCC target triplet: any


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


             reply	other threads:[~2007-07-17 10:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-17 10:00 georgjohann at web dot de [this message]
2007-07-17 10:23 ` [Bug rtl-optimization/32790] " pinskia at gcc dot gnu dot org
2007-07-17 11:13 ` georgjohann at web dot de

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-32790-11621@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).