public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/12133] New: Reload abort in simd-3.c
@ 2003-09-02 16:30 drow at gcc dot gnu dot org
  2003-12-19 15:43 ` [Bug target/12133] " rearnsha at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: drow at gcc dot gnu dot org @ 2003-09-02 16:30 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: Reload abort in simd-3.c
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drow at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-pc-linux-gnu
  GCC host triplet: i386-pc-linux-gnu
GCC target triplet: arm-elf

You need to run the testsuite with -mno-apcs-frame -msoft-float to reproduce this
with an arm-elf compiler:
gcc -msoft-float -mno-apcs-frame -S testsuite/gcc.c-torture/compile/simd-3.c -O1

simd-3.c:22: internal compiler error: in change_address_1, at emit-rtl.c:2125
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

The problem is caused by storing the result of the addition in a temporary on
the stack.  With -mno-apcs-frame, the temporary happens to be located at exactly
$sp.  When find_reloads_toplev is called on:

(insn 44 43 45 0 0x40347294 (set (subreg:DF (reg:V2DF 76) 8)
        (reg:DF 0 r0 [82])) 183 {*movdf_soft_insn} (insn_list 33 (insn_list 43
(nil)))
    (expr_list:REG_DEAD (reg:DF 0 r0 [82])
        (nil)))

with call debug_rtx (reg_equiv_mem[76])
(mem:V2DF (reg/f:SI 13 sp) [0 S16 A64])

[instead of (plus (reg fp) (const int -48)) which we get with -mapcs-frame.]

We hit this code:               && (reg_equiv_address[regno] != 0
                   || (reg_equiv_mem[regno] != 0
                       && (! strict_memory_address_p (GET_MODE (x),
                                                      XEXP
(reg_equiv_mem[regno], 0))
                           || ! offsettable_memref_p (reg_equiv_mem[regno])
                           || num_not_at_initial_offset))))

Eventually, offsettable_memref_p calls strict_memory_address_p on:
(plus:SI (reg/f:SI 13 sp)
    (const_int 15 [0xf]))
with mode == QImode.

Here's where we have trouble.  GO_IF_LEGITIMATE_ADDRESS accepts the above
for QImode, but does not accept
(plus:SI (reg/f:SI 13 sp)
    (const_int 8 [0xf]))
for DFmode.  So we abort, because the result is unrecognizable.

I don't see how to handle this.  output_double_move can handle this - it
will output two stores instead of a store-multiple - but presumably accepting
this as legitimate would hurt other generated code.

Is it feasible to allow offsettable_memref_p to vary by mode?  Or should
this be checked somewhere else?


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

* [Bug target/12133] Reload abort in simd-3.c
  2003-09-02 16:30 [Bug target/12133] New: Reload abort in simd-3.c drow at gcc dot gnu dot org
  2003-12-19 15:43 ` [Bug target/12133] " rearnsha at gcc dot gnu dot org
@ 2003-12-19 15:43 ` rearnsha at arm dot com
  2004-01-23 20:18 ` dhazeghi at yahoo dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rearnsha at arm dot com @ 2003-12-19 15:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rearnsha at arm dot com  2003-12-19 15:34 -------
Subject: Re:  Reload abort in simd-3.c

This is just an idea on how we might prevent this.  It does fix the abort, 
but I haven't had time to test it much.

The patch works by using adjust_address_nv to generate a candidate 
replacement address and then tries to validate that specific address (and 
mode) rather than trying to guess by using offsettable_address_p, which 
clearly doesn't work in this case.

R.



------- Additional Comments From rearnsha at arm dot com  2003-12-19 15:34 -------
Created an attachment (id=5348)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5348&action=view)


-- 


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


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

* [Bug target/12133] Reload abort in simd-3.c
  2003-09-02 16:30 [Bug target/12133] New: Reload abort in simd-3.c drow at gcc dot gnu dot org
@ 2003-12-19 15:43 ` rearnsha at gcc dot gnu dot org
  2003-12-19 15:43 ` rearnsha at arm dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2003-12-19 15:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rearnsha at arm dot com
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-12-19 15:35:33
               date|                            |


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


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

* [Bug target/12133] Reload abort in simd-3.c
  2003-09-02 16:30 [Bug target/12133] New: Reload abort in simd-3.c drow at gcc dot gnu dot org
  2003-12-19 15:43 ` [Bug target/12133] " rearnsha at gcc dot gnu dot org
  2003-12-19 15:43 ` rearnsha at arm dot com
@ 2004-01-23 20:18 ` dhazeghi at yahoo dot com
  2004-07-09 10:06 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dhazeghi at yahoo dot com @ 2004-01-23 20:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dhazeghi at yahoo dot com  2004-01-23 20:18 -------
Reconfirmed on 3.3-branch/mainline. Richard, are you planning to submit the patch?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code, patch


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


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

* [Bug target/12133] Reload abort in simd-3.c
  2003-09-02 16:30 [Bug target/12133] New: Reload abort in simd-3.c drow at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-01-23 20:18 ` dhazeghi at yahoo dot com
@ 2004-07-09 10:06 ` cvs-commit at gcc dot gnu dot org
  2004-07-09 10:29 ` rearnsha at gcc dot gnu dot org
  2004-07-09 17:07 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-07-09 10:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-07-09 10:06 -------
Subject: Bug 12133

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rearnsha@gcc.gnu.org	2004-07-09 10:06:03

Modified files:
	gcc            : ChangeLog 
	gcc/config/arm : arm.c 

Log message:
	PR target/12133
	* arm.c (arm_legitimate_index_p) Allow DFmode for soft-float
	and DImode to use +/-4k offset.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4417&r2=2.4418
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm.c.diff?cvsroot=gcc&r1=1.374&r2=1.375



-- 


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


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

* [Bug target/12133] Reload abort in simd-3.c
  2003-09-02 16:30 [Bug target/12133] New: Reload abort in simd-3.c drow at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-07-09 10:06 ` cvs-commit at gcc dot gnu dot org
@ 2004-07-09 10:29 ` rearnsha at gcc dot gnu dot org
  2004-07-09 17:07 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2004-07-09 10:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rearnsha at gcc dot gnu dot org  2004-07-09 10:29 -------
Here's an explanation of why I've fixed it this way.

http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00926.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug target/12133] Reload abort in simd-3.c
  2003-09-02 16:30 [Bug target/12133] New: Reload abort in simd-3.c drow at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-07-09 10:29 ` rearnsha at gcc dot gnu dot org
@ 2004-07-09 17:07 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-09 17:07 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.5.0


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


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

end of thread, other threads:[~2004-07-09 17:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-02 16:30 [Bug target/12133] New: Reload abort in simd-3.c drow at gcc dot gnu dot org
2003-12-19 15:43 ` [Bug target/12133] " rearnsha at gcc dot gnu dot org
2003-12-19 15:43 ` rearnsha at arm dot com
2004-01-23 20:18 ` dhazeghi at yahoo dot com
2004-07-09 10:06 ` cvs-commit at gcc dot gnu dot org
2004-07-09 10:29 ` rearnsha at gcc dot gnu dot org
2004-07-09 17:07 ` pinskia 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).