From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22385 invoked by alias); 14 Aug 2012 13:37:36 -0000 Received: (qmail 22298 invoked by uid 22791); 14 Aug 2012 13:37:35 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_IB,TW_JL X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Aug 2012 13:37:16 +0000 From: "eric.batut at allegorithmic dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54252] New: [Neon] Bad alignment code generated for Neon loads Date: Tue, 14 Aug 2012 13:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: eric.batut at allegorithmic 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-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-08/txt/msg00853.txt.bz2 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)