Bug 28150 - ICE in reload_cse_simplify_operands, at postreload.c:394
Summary: ICE in reload_cse_simplify_operands, at postreload.c:394
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.2
: P3 normal
Target Milestone: 4.1.2
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-24 09:23 UTC by Pawel Sikora
Modified: 2006-07-26 20:26 UTC (History)
4 users (show)

See Also:
Host: ppc-linux
Target: powerpc-linux-gnu
Build: ppc-linux
Known to work:
Known to fail:
Last reconfirmed: 2006-06-30 12:11:58


Attachments
testcase (32.49 KB, application/octet-stream)
2006-06-24 09:23 UTC, Pawel Sikora
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Sikora 2006-06-24 09:23:13 UTC
$ gcc lib_delegate.i -c -Wall -O

lib_delegate.c: In function 'PackDelegateInvokeParams':
lib_delegate.c:273: error: insn does not satisfy its constraints:
(insn 205 104 105 9 (set (mem/c/i:TF (pre_inc:SI (reg/v/f:SI 29 29 [orig:119 ptr ] [119])) [0 nativeFloat+0 S16 A64])
        (reg:TF 45 13)) 242 {*movtf_internal} (nil)
    (expr_list:REG_INC (reg/v/f:SI 29 29 [orig:119 ptr ] [119])
        (nil)))
lib_delegate.c:273: internal compiler error: in reload_cse_simplify_operands, at postreload.c:394
Comment 1 Pawel Sikora 2006-06-24 09:23:42 UTC
Created attachment 11740 [details]
testcase
Comment 2 Andrew Pinski 2006-06-24 17:49:48 UTC
How did you configure GCC becase having TFmode there sounds like you configured to have 128bit long double to be default.
Comment 3 Pawel Sikora 2006-06-25 08:47:23 UTC
(In reply to comment #2)
> How did you configure GCC becase having TFmode there sounds like you configured
> to have 128bit long double to be default.
> 

$ gcc -v
Reading specs from /usr/lib/gcc/ppc-pld-linux/4.1.2/specs
Target: ppc-pld-linux
Configured with: ../configure --prefix=/usr --with-local-prefix=/usr/local
--libdir=/usr/lib --libexecdir=/usr/lib --infodir=/usr/share/info
--mandir=/usr/share/man --x-libraries=/usr/lib --enable-shared
--enable-threads=posix --enable-languages=c,c++,fortran,objc,obj-c++,ada,java
--enable-c99 --enable-long-long --disable-multilib --enable-nls
--disable-werror --with-gnu-as --with-gnu-ld --with-demangler-in-ld
--with-system-zlib --with-slibdir=/lib --without-system-libunwind
--enable-cmath --with-long-double-128 --enable-secureplt
--with-gxx-include-dir=/usr/include/c++/4.1.2 --disable-libstdcxx-pch
--enable-__cxa_atexit --enable-libstdcxx-allocator=new
--with-qt4dir=/usr/lib/qt4 --disable-libjava-multilib --enable-libgcj
--enable-libgcj-multifile --enable-libgcj-database --enable-gtk-cairo
--enable-java-awt=qt,gtk,xlib --enable-jni --enable-xmlj --enable-alsa
--enable-dssi ppc-pld-linux
Thread model: posix
gcc version 4.1.2 20060623 (prerelease) (PLD-Linux)

glibc-2.4, kernel-2.6
Comment 4 Pawel Sikora 2006-06-29 09:36:31 UTC
this bug blocks portable.net developing.
Comment 5 Pawel Sikora 2006-06-29 19:27:48 UTC
reduced testcase:

void foo( void* dst, void* src, int x )
{
        long double nativeFloat;
        void *ptr;
        if (x)
        {
                nativeFloat = (long double)(*((float*)src));
                ptr = (void *)&nativeFloat;
        }
        else
                ptr = (void *)0;
        memcpy( dst, ptr, 1 );
}


tmp.i:13: error: insn does not satisfy its constraints:
(insn 54 26 27 1 (set (mem/c/i:TF (pre_inc:SI (reg/v/f:SI 9 9 [orig:119 ptr ] [119])) [4 nativeFloat+0 S16 A64])
        (reg:TF 45 13)) 242 {*movtf_internal} (nil)
    (expr_list:REG_INC (reg/v/f:SI 9 9 [orig:119 ptr ] [119])
        (nil)))
tmp.i:13: internal compiler error: in reload_cse_simplify_operands, at postreload.c:394
Comment 6 Andrew Pinski 2006-06-30 12:11:58 UTC
Confirmed with the reduced testcase only on the mainline.
Comment 7 David Edelsohn 2006-07-05 20:03:04 UTC
I think this simply is a case of not allowing TFmode in PRE_INC addresses:

Index: rs6000.c
===================================================================
--- rs6000.c    (revision 115196)
+++ rs6000.c    (working copy)
@@ -3522,6 +3522,7 @@
   if ((GET_CODE (x) == PRE_INC || GET_CODE (x) == PRE_DEC)
       && !ALTIVEC_VECTOR_MODE (mode)
       && !SPE_VECTOR_MODE (mode)
+      && mode != TFmode
       /* Restrict addressing for DI because of our SUBREG hackery.  */
       && !(TARGET_E500_DOUBLE && (mode == DFmode || mode == DImode))
       && TARGET_UPDATE
Comment 8 David Edelsohn 2006-07-06 19:00:13 UTC
Subject: Bug 28150

Author: dje
Date: Thu Jul  6 18:59:58 2006
New Revision: 115229

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115229
Log:
2006-07-06  David Edelsohn  <edelsohn@gnu.org>

        PR target/28150
        * config/rs6000/rs6000.c (rs6000_legitimate_address): Do not allow
        PRE_{INC,DEC} of TFmode.

2006-07-06  David Edelsohn  <edelsohn@gnu.org>
            Alan Modra  <amodra@bigpond.net.au>

        PR target/28170
        * config/rs6000/rs6000.c (insvdi_rshift_rlwimi_p): Correct shiftop
        bounds. Simplify.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000.c

Comment 9 David Edelsohn 2006-07-26 20:22:06 UTC
Subject: Bug 28150

Author: dje
Date: Wed Jul 26 20:21:49 2006
New Revision: 115764

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115764
Log:
        Backport from mainline
        2006-07-14  Eliot Dresselhaus  <eliot@sonic.net>

        PR target/27287
        * config/rs6000/spe.md (frob_di_df_2): Add m->r alternative.

        2006-07-06  David Edelsohn  <edelsohn@gnu.org>

        PR target/28150
        * config/rs6000/rs6000.c (rs6000_legitimate_address): Do not allow
        PRE_{INC,DEC} of TFmode.

        2006-07-06  David Edelsohn  <edelsohn@gnu.org>
                    Alan Modra  <amodra@bigpond.net.au>

        PR target/28170
        * config/rs6000/rs6000.c (insvdi_rshift_rlwimi_p): Correct shiftop
        bounds. Simplify.

Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/config/rs6000/rs6000.c
    branches/gcc-4_1-branch/gcc/config/rs6000/spe.md

Comment 10 David Edelsohn 2006-07-26 20:26:59 UTC
patch backported