public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/57717] New: error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe
@ 2013-06-25 22:55 raj.khem at gmail dot com
  2013-06-25 22:58 ` [Bug target/57717] " raj.khem at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: raj.khem at gmail dot com @ 2013-06-25 22:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57717
           Summary: error: unrecognizable insn compiling ./strtod_l.c from
                    glibc on powerpc-gnuspe
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: raj.khem at gmail dot com

Created attachment 30363
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30363&action=edit
testcase

The attached testcase fails causes a gcc ICE when building for gnuspe targets
where -mfloat-gprs=double is used -mfloat-gprs=single works fine

$ ./gcc/cc1 ~/a.c -mfloat-gprs=double

__bswap_32 __bswap_64 atoi atol atoll gnu_dev_major gnu_dev_minor
gnu_dev_makedev __libc_use_alloca atof stat lstat fstat fstatat mknod mknodat
stat64 lstat64 fstat64 fstatat64 __stat __mknod btowc wctob mbrlen
__sigismember __sigaddset __sigdelset pthread_equal __cmsg_nxthdr __ctype_b_loc
__ctype_toupper_loc __ctype_tolower_loc tolower toupper __strcspn_c1
__strcspn_c2 __strcspn_c3 __strspn_c1 __strspn_c2 __strspn_c3 __strpbrk_c2
__strpbrk_c3 __strtok_r_1c __strsep_1c __strsep_2c __strsep_3c
get_rounding_mode round_away __mpn_add_1 __mpn_add __mpn_sub_1 __mpn_sub
overflow_value underflow_value round_and_return str_to_mpn __mpn_lshift_1
____strtold_l_internal ____new_strtold_l ldbl_extract_mantissa
ldbl_insert_mantissa ldbl_pack ldbl_unpack ldbl_canonicalize ldbl_nearbyint
__copysign __copysignf __copysignl default_libc_feholdexcept
default_libc_fesetround default_libc_feholdexcept_setround
default_libc_fesetenv default_libc_feupdateenv default_libc_feupdateenv_test
Analyzing compilation unit
 {GC 5330k -> 3381k}Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <*free_inline_summary>
<emutls> <whole-program>Assembling functions:
 get_rounding_mode round_away overflow_value underflow_value round_and_return
str_to_mpn {GC 5341k -> 4033k} ____strtold_l_internal
In file included from ../sysdeps/ieee754/ldbl-128ibm/strtold_l.c:54:0:
./strtod_l.c: In function '____strtold_l_internal':
./strtod_l.c:1778:1: error: unrecognizable insn:
(insn 6071 6070 1650 234 (set (reg:TI 4 4)
        (mem/c:TI (plus:SI (reg:SI 5 5)
                (const_int 2032 [0x7f0])) [0 %sfp+2032 S16 A128]))
./strtod_l.c:1002 -1
     (nil))
./strtod_l.c:1778:1: internal compiler error: in extract_insn, at recog.c:2158
0x7ec4c5 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../gcc/gcc/rtl-error.c:109
0x7ec4f9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ../../gcc/gcc/rtl-error.c:117
0x7bf4c3 extract_insn(rtx_def*)
        ../../gcc/gcc/recog.c:2158
0x7bf534 extract_insn_cached(rtx_def*)
        ../../gcc/gcc/recog.c:2061
0x61f0a6 cleanup_subreg_operands(rtx_def*)
        ../../gcc/gcc/final.c:2998
0x7eb7b6 reload(rtx_def*, int)
        ../../gcc/gcc/reload1.c:1240
0x70637b do_reload
        ../../gcc/gcc/ira.c:4701
0x70637b rest_of_handle_reload
        ../../gcc/gcc/ira.c:4801

This has been seen on trunk and 4.8 branch works ok on 4.7 and below


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

* [Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe
  2013-06-25 22:55 [Bug target/57717] New: error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe raj.khem at gmail dot com
@ 2013-06-25 22:58 ` raj.khem at gmail dot com
  2013-06-27  9:06 ` amodra at gmail dot com
  2013-07-12 14:10 ` alexandru.sardan at freescale dot com
  2 siblings, 0 replies; 4+ messages in thread
From: raj.khem at gmail dot com @ 2013-06-25 22:58 UTC (permalink / raw)
  To: gcc-bugs

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

Khem Raj <raj.khem at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |amodra at gcc dot gnu.org,
                   |                            |raj.khem at gmail dot com

--- Comment #1 from Khem Raj <raj.khem at gmail dot com> ---
I have tracked it down to this commit

Author: amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Tue Jul 24 05:55:50 2012 +0000

        PR target/53914
        PR target/54009
        * config/rs6000/constraints.md (Y): Use mem_operand_gpr.
        * config/rs6000/predicates.md (word_offset_memref_operand): Delete.
        Adjust all rs6000_legitimate_offset_address_p calls.
        * config/rs6000/rs6000-protos.h (mem_operand_gpr): Declare.
        (rs6000_secondary_reload_gpr): Declare.
        (rs6000_legitimate_offset_address_p): Update prototype.
        (rs6000_offsettable_memref_p): Delete.
        (rs6000_secondary_reload_ppc64): Delete.
        * config/rs6000/rs6000.c (address_offset): New function.
        (mem_operand_gpr): Likewise.
        (rs6000_legitimate_offset_address_p): Add worst_case param.  When
        not worst_case assume class of regs with least restrictive offsets.
        Adjust all calls.
        (legitimate_lo_sum_address_p): Simplify register mode tests.
        (rs6000_legitimize_address): Likewise.  Assume best case offset
        addressing.  Combine ELF and MACHO lo_sum code.
        (rs6000_mode_dependent_address): Correct offset addressing limits.
        (rs6000_offsettable_memref_p): Make static, add reg_mode param.
        Use reg_mode to help rs6000_legitimate_offset_address_p.
        (rs6000_secondary_reload): Use address_offset.  Handle 32-bit multi
        gpr load/store when offset too large.
        (rs6000_secondary_reload_gpr): Renamed rs6000_secondary_reload_ppc64.
        (rs6000_split_multireg_move): Adjust rs6000_offsettable_memref_p calls.
        * config/rs6000/rs6000.md (movdf_hardfloat32): Use 'Y' constraint
        for gpr load/store.  Order alternatives as r->Y,Y->r,r->r and
        d->m,m->d,d->d.  Correct size of gpr load/store.
        (movdf_softfloat32): Use 'Y' constraint for gpr load/store.  Order
        alternatives.
        (movti_ppc64): Likewise.
        (movdi_internal32): Likewise.  Also disparage fprs.
        (movdi_mfpgpr, movdi_internal64): Likewise.
        (movtf_internal): Use 'm' for fpr load/store.  Order alternatives.
        (movtf_softfloat): Order alternatives.
        (extenddftf2_internal): Use 'm' and 'Y' for store.
        (movti_power, movti_string): Use 'Y' for gpr load/store.  Order.
        (stack_protect_setdi, stack_protect_testdi): Likewise.
        (movdf_hardfloat64_mfpgpr, movdf_hardfloat64): Order alternatives.
        (movdf_softfloat64): Likewise.
        (reload_<mode>_store): Adjust reload_di_store to provide
        reload_si_store as well.
        (reload_<mode>_load): Likewise.
>From gcc-bugs-return-425151-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 25 23:01:03 2013
Return-Path: <gcc-bugs-return-425151-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 740 invoked by alias); 25 Jun 2013 23:01:02 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 673 invoked by uid 48); 25 Jun 2013 23:00:57 -0000
From: "raj.khem at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe
Date: Tue, 25 Jun 2013 23:01:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: raj.khem at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cf_gcctarget cf_known_to_work cf_gcchost cf_known_to_fail cf_gccbuild
Message-ID: <bug-57717-4-rLTAXx1jhw@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57717-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57717-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01530.txt.bz2
Content-length: 3241

http://gcc.gnu.org/bugzilla/show_bug.cgi?idW717

Khem Raj <raj.khem at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |powerpc-angstrom-linux-gnus
                   |                            |pe
      Known to work|                            |4.7.0, 4.7.1, 4.7.2
               Host|                            |x86_64-linux
      Known to fail|                            |4.8.0, 4.8.1, 4.9.0
              Build|                            |x86_64-linux

--- Comment #2 from Khem Raj <raj.khem at gmail dot com> ---
This is how gcc is configured

Target: powerpc-angstrom-linux-gnuspe
Configured with: ../gcc/configure --build=x86_64-linux --host=x86_64-linux
--target=powerpc-angstrom-linux-gnuspe
--prefix=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr
--exec_prefix=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr
--bindir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/bin/ppce500v2-angstrom-linux-gnuspe.gcc-cross-initial
--sbindir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/bin/ppce500v2-angstrom-linux-gnuspe.gcc-cross-initial
--libexecdir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/libexec/ppce500v2-angstrom-linux-gnuspe.gcc-cross-initial
--datadir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/share
--sysconfdir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/etc
--sharedstatedir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/com
--localstatedir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/var
--libdir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/lib/ppce500v2-angstrom-linux-gnuspe.gcc-cross-initial
--includedir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/include
--oldincludedir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/include
--infodir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/share/info
--mandir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/share/man
--disable-silent-rules --disable-dependency-tracking
--with-libtool-sysroot=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux
--with-newlib --without-headers --disable-shared --disable-threads
--disable-multilib --disable-__cxa_atexit --enable-languages=c
--program-prefix=powerpc-angstrom-linux-gnuspe-
--with-sysroot=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/p2020ds
--with-build-sysroot=/builds1/angstrom/build/tmp-angstrom_next-eglibc/work/ppce500v2-angstrom-linux-gnuspe/gcc-cross-initial/4.8.1-r0/gcc-4.8.1/build.x86_64-linux.powerpc-angstrom-linux-gnuspe/tmpsysroot
--disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath
--with-system-zlib --disable-lto --disable-plugin --enable-decimal-float=no
--enable-e500_double --disable-nls --with-long-double-128


Thread model: single
gcc version 4.9.0 20130625 (experimental) (GCC)


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

* [Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe
  2013-06-25 22:55 [Bug target/57717] New: error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe raj.khem at gmail dot com
  2013-06-25 22:58 ` [Bug target/57717] " raj.khem at gmail dot com
@ 2013-06-27  9:06 ` amodra at gmail dot com
  2013-07-12 14:10 ` alexandru.sardan at freescale dot com
  2 siblings, 0 replies; 4+ messages in thread
From: amodra at gmail dot com @ 2013-06-27  9:06 UTC (permalink / raw)
  To: gcc-bugs

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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com

--- Comment #3 from Alan Modra <amodra at gmail dot com> ---
Created attachment 30383
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30383&action=edit
potential fix

This reverts part of the patch identified in comment #1, and cures the testcase
failure.


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

* [Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe
  2013-06-25 22:55 [Bug target/57717] New: error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe raj.khem at gmail dot com
  2013-06-25 22:58 ` [Bug target/57717] " raj.khem at gmail dot com
  2013-06-27  9:06 ` amodra at gmail dot com
@ 2013-07-12 14:10 ` alexandru.sardan at freescale dot com
  2 siblings, 0 replies; 4+ messages in thread
From: alexandru.sardan at freescale dot com @ 2013-07-12 14:10 UTC (permalink / raw)
  To: gcc-bugs

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

Alexandru-Cezar Sărdan <alexandru.sardan at freescale dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alexandru.sardan@freescale.
                   |                            |com

--- Comment #5 from Alexandru-Cezar Sărdan <alexandru.sardan at freescale dot com> ---
Created attachment 30500
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30500&action=edit
testcase

The attached test case causes another ICE if gcc is compiled for gnuspe targets
after the patch proposed in comment #4 is applied and -mfloat-gprs=double is
used.
Also -mfloat-gprs=single works fine.

$ ./gcc/cc1 -m32 -mcpu=8548 -mabi=spe -mspe -mfloat-gprs=double ~/test.c 
 __bswap_32 __bswap_64 create_Result_file main
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <*free_inline_summary>
<whole-program>Assembling functions:
 create_Result_file
/home/alex/test.c: In function 'create_Result_file':
/home/alex/test.c:43:1: internal compiler error: in change_address_1, at
emit-rtl.c:2019
 }
 ^
>From gcc-bugs-return-426173-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jul 12 14:14:24 2013
Return-Path: <gcc-bugs-return-426173-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 5280 invoked by alias); 12 Jul 2013 14:14:24 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 5141 invoked by uid 48); 12 Jul 2013 14:14:14 -0000
From: "dushistov at mail dot ru" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57890] New: gcc 4.8.1 regression: loops become slower
Date: Fri, 12 Jul 2013 14:14:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: major
X-Bugzilla-Who: dushistov at mail dot ru
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-57890-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-07/txt/msg00680.txt.bz2
Content-length: 1408

http://gcc.gnu.org/bugzilla/show_bug.cgi?idW890

            Bug ID: 57890
           Summary: gcc 4.8.1 regression: loops become slower
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dushistov at mail dot ru

$cat what_test.cpp
char c[100];

void f(void)
{
        for(int i=0; i < 100; ++i)
                c[i] = '0';
}

I run this test with:
cat test.cpp
#include <cstddef>

extern void f();

int main()
{
    for (size_t i = 0; i < 100000000; ++i)
        f();
}

compile with "-march=native -O3" on (i7 64bit mode).

Here is result:
for test_loop47 we get average 0.348000
for test_loop481 we get average 0.400000

If compare generated code then on 4.7 "f" function is transformed to:
push   %rbp
vmovdqa 0x107(%rip),%ymm0
movb   $0x30,0x200aa0(%rip)
movb   $0x30,0x200a9a(%rip)
mov    %rsp,%rbp
vmovdqa %ymm0,0x200a2e(%rip)
...

on gcc 4.8.1:

movabs $0x3030303030303030,%rax
movl   $0x30303030,0x200a9c(%rip)
mov    %rax,0x200a35(%rip)
mov    %rax,0x200a36(%rip)
...


PS

I just checked may be
http://gcc.gnu.org/bugzilla/show_bug.cgi?idU953
fixed in gcc 4.8.1,
and yes it indeed "fixed", instead of optimal for loops and
not optimal for builtin_memset it now produces not the same not optimal code
for both cases.


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

end of thread, other threads:[~2013-07-12 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-25 22:55 [Bug target/57717] New: error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe raj.khem at gmail dot com
2013-06-25 22:58 ` [Bug target/57717] " raj.khem at gmail dot com
2013-06-27  9:06 ` amodra at gmail dot com
2013-07-12 14:10 ` alexandru.sardan at freescale 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).