This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.


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

           Summary: [arm gcc] NEON: Stack pointer operations performed
                    even tho stack is not accessed at all in function.
           Product: gcc
           Version: 4.5.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: julien@cayzac.name


Created attachment 24218
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24218
Source showcasing the problem

Using some float32x4x2_t temporaries, some stack space is allocated even though
the temporaries are made registers and stack never gets accessed inside the
function.

See attachment for C source and a corresponding assembly, produced with:

arm-elf-gcc-4.5 -O3 -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=softfp -S -o
- test.c | grep -vE '^[[:space:]]*[\.@].*$' (the grep is just there to remove
lines of comments and directives)

The problem also happens in C++.

$ arm-elf-gcc-4.5 --version -v
Using built-in specs.
COLLECT_GCC=arm-elf-gcc-4.5
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/arm-elf/4.5.0/lto-wrapper
arm-elf-gcc-4.5 (GCC) 4.5.0
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Target: arm-elf
Configured with:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_arm-elf-gcc/work/gcc-4.5.0/configure
--prefix=/opt/local --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --target=arm-elf --program-prefix=arm-elf-
--program-suffix=-4.5 --without-included-gettext --enable-obsolete
--with-newlib --disable-__cxa_atexit --enable-multilib --enable-biendian
--disable-libgfortran
--with-gxx-include-dir=/opt/local/arm-elf/include/c++/4.5.0/
--enable-languages=c,c++,objc --build=x86_64-apple-darwin10 --enable-fpu
Thread model: single
gcc version 4.5.0 (GCC) 
COLLECT_GCC_OPTIONS='-fversion' '-v'
 /opt/local/libexec/gcc/arm-elf/4.5.0/cc1 -quiet -v -D__USES_INITFINI__
help-dummy -quiet -dumpbase help-dummy -auxbase help-dummy -version -fversion
-o /var/folders/Gn/GnNf6VbPEc4MTtfs4l39zU+++TI/-Tmp-//cc1shhZd.s
GNU C (GCC) version 4.5.0 (arm-elf)
    compiled by GNU C version 4.2.1 (Apple Inc. build 5666) (dot 3), GMP
version 5.0.1, MPFR version 3.0.0-p8, MPC version 0.8.2
warning: MPFR header version 3.0.0-p8 differs from library version 3.0.1-p3.
warning: MPC header version 0.8.2 differs from library version 0.9.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-fversion' '-v'
 /opt/local/lib/gcc/arm-elf/4.5.0/../../../../arm-elf/bin/as --version -o
/var/folders/Gn/GnNf6VbPEc4MTtfs4l39zU+++TI/-Tmp-//ccuztVa3.o
/var/folders/Gn/GnNf6VbPEc4MTtfs4l39zU+++TI/-Tmp-//cc1shhZd.s
GNU assembler (Linux/GNU Binutils) 2.20.51.0.9.20100526
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `arm-elf'.
COMPILER_PATH=/opt/local/libexec/gcc/arm-elf/4.5.0/:/opt/local/libexec/gcc/arm-elf/4.5.0/:/opt/local/libexec/gcc/arm-elf/:/opt/local/lib/gcc/arm-elf/4.5.0/:/opt/local/lib/gcc/arm-elf/:/opt/local/lib/gcc/arm-elf/4.5.0/../../../../arm-elf/bin/
LIBRARY_PATH=/opt/local/lib/gcc/arm-elf/4.5.0/:/opt/local/lib/gcc/arm-elf/4.5.0/../../../../arm-elf/lib/
COLLECT_GCC_OPTIONS='-fversion' '-v'
 /opt/local/libexec/gcc/arm-elf/4.5.0/collect2 -X --version
/opt/local/lib/gcc/arm-elf/4.5.0/crti.o
/opt/local/lib/gcc/arm-elf/4.5.0/crtbegin.o
/opt/local/lib/gcc/arm-elf/4.5.0/../../../../arm-elf/lib/crt0.o
-L/opt/local/lib/gcc/arm-elf/4.5.0
-L/opt/local/lib/gcc/arm-elf/4.5.0/../../../../arm-elf/lib
/var/folders/Gn/GnNf6VbPEc4MTtfs4l39zU+++TI/-Tmp-//ccuztVa3.o --start-group
-lgcc -lc --end-group /opt/local/lib/gcc/arm-elf/4.5.0/crtend.o
/opt/local/lib/gcc/arm-elf/4.5.0/crtn.o
GNU ld (Linux/GNU Binutils) 2.20.51.0.9.20100526
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]