public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "julien at cayzac dot name" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
Date: Tue, 10 May 2011 03:13:00 -0000	[thread overview]
Message-ID: <bug-48941-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


             reply	other threads:[~2011-05-10  3:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10  3:13 julien at cayzac dot name [this message]
2011-05-12  7:26 ` [Bug target/48941] " ramana at gcc dot gnu.org
2011-05-12  7:39 ` rsandifo at gcc dot gnu.org
2011-05-12  9:22 ` rsandifo at gcc dot gnu.org
2011-05-16  9:07 ` rearnsha at gcc dot gnu.org
2011-06-02 13:41 ` rsandifo at gcc dot gnu.org
2011-11-24 11:35 ` rearnsha at gcc dot gnu.org
2012-01-18 12:06 ` rsandifo at gcc dot gnu.org
2012-01-27 14:40 ` eric.batut at allegorithmic dot com
2012-01-27 17:12 ` ramana at gcc dot gnu.org
2012-05-02  6:29 ` ramana at gcc dot gnu.org
2012-05-02  6:52 ` ramana at gcc dot gnu.org
2012-05-22 14:40 ` ramana at gcc dot gnu.org
2012-07-05 16:57 ` ramana at gcc dot gnu.org
2012-07-05 17:02 ` ramana at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-48941-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).