public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/32790]  New: REG_N_SETS holds wrong value
@ 2007-07-17 10:00 georgjohann at web dot de
  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
  0 siblings, 2 replies; 5+ messages in thread
From: georgjohann at web dot de @ 2007-07-17 10:00 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <bug-32790-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2015-01-17  7:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-17 10:00 [Bug rtl-optimization/32790] New: REG_N_SETS holds wrong value georgjohann at web dot de
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
     [not found] <bug-32790-4@http.gcc.gnu.org/bugzilla/>
2015-01-17  7:25 ` law at gcc dot gnu.org
2015-01-17  7:28 ` law at redhat dot com

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).