public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/4016: compiler bug during reload on c4x target
@ 2001-08-13 12:36 Haj.Ten.Brugge
  0 siblings, 0 replies; only message in thread
From: Haj.Ten.Brugge @ 2001-08-13 12:36 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4016
>Category:       c
>Synopsis:       compiler bug during reload on c4x target
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 13 12:36:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Haj.Ten.Brugge
>Release:        3.0 and 3.1
>Organization:
>Environment:
c4x target
>Description:
I have some problems with reload and parallel instruction on the
c4x target. The problems seems to be caused by incorrect handling
of eliminable registers.
After the lreg pass I have an insn that looks like:

(insn 20 19 21 (parallel[
            (set (reg:QI 41)
                (mem:QI (post_inc:QI (reg/f:QI 40)) 0))
            (set (mem:QI (plus:QI (reg/f:QI 59)
                        (const_int 1 [01h])) 0)
                (reg:QI 41))
        ] ) 10 {movqi_parallel} (insn_list 121 (insn_list 17 (insn_list 18 (nil))))
    (expr_list:REG_INC (reg/f:QI 40)
        (nil)))

Reload also finds an eliminable register that can replace the
'(plus:QI (reg/f:QI 59) (const_int 1 [01h]))' part of this insn.
The replace is '(plus:QI (reg/f:QI 11 ar3) (const_int 2 [02h]))'.
The insn now looks like:

(insn 20 19 21 (parallel[
            (set (reg:QI 0 r0 [41])
                (mem:QI (post_inc:QI (reg/f:QI 9 ar1 [40])) 0))
            (set (mem:QI (plus:QI (reg/f:QI 11 ar3)
                        (const_int 2 [02h])) 0)
                (reg:QI 0 r0 [41]))
        ] ) 10 {movqi_parallel} (insn_list 121 (insn_list 17 (insn_list 18 (nil)
)))
    (expr_list:REG_INC (reg/f:QI 9 ar1 [40])
        (nil)))

The problem is that this insn is not valid anymore because the offset for
a register for parallel insns on the c4x can only be 1.
After reload makes this faulty change it complains that the insn is not
valid anymore and can not recover from this.

This problem happens on the 3.0 and 3.1 release. The code that fails on 3.0 is
rather large and is also confidential. The 3.1 code that fails is:

.../gcc/testsuite/gcc.c-torture/execute/961213-1.c

When this code is compiled with '-O3 -m30' and the compiler is configured
with '--target=c4x' the above problem happens.

If I disable generating eliminable registers the problem goes away.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-13 12:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-13 12:36 c/4016: compiler bug during reload on c4x target Haj.Ten.Brugge

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