public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/23424] New: cris.md rtl canonicalization bug
@ 2005-08-16 17:44 hp at gcc dot gnu dot org
  2005-08-16 17:47 ` [Bug target/23424] " hp at gcc dot gnu dot org
  0 siblings, 1 reply; 9+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-08-16 17:44 UTC (permalink / raw)
  To: gcc-bugs

For this code, at -O2:
extern char *x;
extern void foo (void);
void f (char *s, char *se, char *mp, char *y)
{
  while (s != se)
    {
      char *p;
      foo ();
      p = s + *mp;
      *y++ = *p;
      s = p;
    }

  x = s;
}
I get with LAST_UPDATED "Tue Aug 16 12:30:26 UTC 2005":
/tmp/b.c:15: error: insn does not satisfy its constraints:
(insn 74 26 29 2 (parallel [
            (set (reg:QI 13 r13)
                (mem:QI (plus:SI (sign_extend:SI (mem:QI (reg/v/f:SI 3 r3
[orig:31 mp ] [31]) [0 S1 A8]))
                        (reg/v/f:SI 0 r0 [orig:29 s ] [29])) [0 S1 A8]))
            (set (reg/v/f:SI 9 r9 [orig:28 p ] [28])
                (plus:SI (sign_extend:SI (mem:QI (reg/v/f:SI 3 r3 [orig:31 mp ]
[31]) [0 S1 A8]))
                    (reg/v/f:SI 0 r0 [orig:29 s ] [29])))
        ]) 18 {*mov_sideqi} (nil)
    (expr_list:REG_DEAD (reg/v/f:SI 0 r0 [orig:29 s ] [29])
        (nil)))
/tmp/b.c:15: internal compiler error: in copyprop_hardreg_forward_1, at
regrename.c:1578

At first sight, there's a cris.md bug that has been there forever:
the insn is supposed to match "*mov_side<mode>", but that can only happen
with help of the "%" commutative marker.  That marker isn't handled after
reload, and the insn is generated by the moverside peephole2 pattern.
All patterns *have* to be able to match whatever (canonical) RTL is generated
by the target after reload, without the commutativity marker.
So I'd say it's a target bug (the generated RTL is canonical) and IMHO arguably
also a documentation bug.  But there's more...

-- 
           Summary: cris.md rtl canonicalization bug
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hp at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: cris-axis-elf


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-02-15  4:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23424-507@http.gcc.gnu.org/bugzilla/>
2005-10-16 23:11 ` [Bug target/23424] cris.md rtl canonicalization bug cvs-commit at gcc dot gnu dot org
2005-10-16 23:18 ` hp at gcc dot gnu dot org
2005-10-16 23:26 ` hp at gcc dot gnu dot org
2005-10-17 20:39 ` cvs-commit at gcc dot gnu dot org
2005-11-04 21:20 ` hp at gcc dot gnu dot org
2005-11-04 21:24 ` hp at gcc dot gnu dot org
2005-12-08 23:07 ` hp at gcc dot gnu dot org
2006-02-15  4:14 ` hp at gcc dot gnu dot org
2005-08-16 17:44 [Bug target/23424] New: " hp at gcc dot gnu dot org
2005-08-16 17:47 ` [Bug target/23424] " hp at gcc dot gnu dot org

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