public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/54252] New: [Neon] Bad alignment code generated for Neon loads
@ 2012-08-14 13:37 eric.batut at allegorithmic dot com
  2012-08-15 10:47 ` [Bug target/54252] " ramana at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: eric.batut at allegorithmic dot com @ 2012-08-14 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54252
           Summary: [Neon] Bad alignment code generated for Neon loads
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: eric.batut@allegorithmic.com


Created attachment 28009
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28009
Small repro case

Using gcc trunk at rev 190381, compiled with the Android NDK r8b build-gcc.sh
script (so an arm-linux-androideabi target) and the command line below, the
attached repro case does not compile, and spits the following error messages:

Erics-Mac:src batut$
/Users/batut/android-ndk-r8b/toolchains/arm-linux-androideabi-4.8.0/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc
-mfloat-abi=hard -mfpu=vfp -mfpu=neon -marm -O1 -c test.c
/var/folders/nr/l7qlwr295379gn7tqyv61jx80000gn/T//cc9BgV0B.s: Assembler
messages:
/var/folders/nr/l7qlwr295379gn7tqyv61jx80000gn/T//cc9BgV0B.s:29: Error: bad
alignment -- `vld1.32 {d16},[r3:128]!'
/var/folders/nr/l7qlwr295379gn7tqyv61jx80000gn/T//cc9BgV0B.s:32: Error: bad
alignment -- `vld1.32 {d7},[r2:128]'

The assembly code generated is:
algNEON:
    @ args = 0, pretend = 0, frame = 0
    @ frame_needed = 0, uses_anonymous_args = 0
    @ link register save eliminated.
    ldr r3, .L2
.LPIC0:
    add r3, pc, r3
    ldr r2, .L2+4
    ldr r2, [r3, r2]
    mov r3, r2
    vld1.32 {d16}, [r3:128]!  <= Offending load
    vld1.32 {d6}, [r3:64]
    add r2, r2, #16
    vld1.32 {d7}, [r2:128]    <= Offending load
    vadd.f32    d16, d0, d16
    vmov.f32    d0, #0.0  @ v2sf
    vmla.f32    d0, d16, d6[0]
    vmls.f32    d0, d16, d6[1]
    vmla.f32    d0, d16, d7[0]
    vmls.f32    d0, d16, d7[1]
    bx  lr

This does not happen at -O0.
This also happens with gcc 4.7.1.


arm-linux-androideabi-gcc -v
Using built-in specs.
COLLECT_GCC=/Users/batut/android-ndk-r8b/toolchains/arm-linux-androideabi-4.8.0/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc
COLLECT_LTO_WRAPPER=/Users/batut/android-ndk-r8b/toolchains/arm-linux-androideabi-4.8.0/prebuilt/darwin-x86/bin/../libexec/gcc/arm-linux-androideabi/4.8.0/lto-wrapper
Target: arm-linux-androideabi
Configured with:
/Users/batut/android-ndk-r8b/src/build/../gcc/gcc-4.8.0/configure
--prefix=/tmp/ndk-batut/build/toolchain/prefix --target=arm-linux-androideabi
--host=x86_64-apple-darwin --build=x86_64-apple-darwin --with-gnu-as
--with-gnu-ld --enable-languages=c,c++
--with-gmp=/tmp/ndk-batut/build/toolchain/temp-install
--with-mpfr=/tmp/ndk-batut/build/toolchain/temp-install
--with-mpc=/tmp/ndk-batut/build/toolchain/temp-install --without-ppl
--without-cloog --disable-libssp --enable-threads --disable-nls
--disable-libmudflap --disable-libgomp --disable-libstdc__-v3
--disable-sjlj-exceptions --disable-shared --disable-tls --disable-libitm
--with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace
--enable-initfini-array --disable-nls
--prefix=/tmp/ndk-batut/build/toolchain/prefix
--with-sysroot=/tmp/ndk-batut/build/toolchain/prefix/sysroot
--with-binutils-version=2.22 --with-mpfr-version=2.4.1 --with-mpc-version=0.8.1
--with-gmp-version=5.0.5 --with-gcc-version=4.8.0 --with-gdb-version=7.3.x
--disable-bootstrap --disable-libquadmath --disable-plugin --with-arch=armv5te
--program-transform-name='s&^&arm-linux-androideabi-&'
Thread model: posix
gcc version 4.8.0 20120814 (experimental) (GCC)


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

end of thread, other threads:[~2012-09-07 10:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-14 13:37 [Bug target/54252] New: [Neon] Bad alignment code generated for Neon loads eric.batut at allegorithmic dot com
2012-08-15 10:47 ` [Bug target/54252] " ramana at gcc dot gnu.org
2012-08-15 11:01 ` ramana at gcc dot gnu.org
2012-08-15 11:18 ` ramana at gcc dot gnu.org
2012-08-15 13:03 ` ramana at gcc dot gnu.org
2012-08-16 11:08 ` [Bug target/54252] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
2012-08-28 12:20 ` ramana at gcc dot gnu.org
2012-08-30 10:17 ` ramana at gcc dot gnu.org
2012-08-30 10:22 ` ramana at gcc dot gnu.org
2012-08-30 15:52 ` eric.batut at allegorithmic dot com
2012-08-30 16:48 ` ramrad01 at arm dot com
2012-09-07  9:32 ` ramana at gcc dot gnu.org
2012-09-07 10:28 ` rguenth at gcc dot gnu.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).