internal compiler error: in reload_cse_simplify_operands, at postreload.c:396 with neon intrinsics in NDK 7

151 views
Skip to first unread message

Martin Johnson

unread,
Nov 28, 2011, 9:48:18 AM11/28/11
to android-ndk
Hi,

We recently added support for neon intrinsics for our code base but
it's failing to compile a release build due to internal compiler
errors of:

internal compiler error: in reload_cse_simplify_operands, at
postreload.c:396

Re-ordering instructions can fix instances of the error but I don't
want to have to make a lot of changes which decrease code quality to
get around a compiler bug. Is this a known issue with an estimated
fix version?

This thread suggests that the problem was fixed in gcc 4.6.2:
http://groups.google.com/group/android-ndk/browse_thread/thread/ebd969a055af3196/36441f19fd71c870?lnk=gst&q=reload_cse_simplify_operands#36441f19fd71c870


Does anyone know of a work around for this error or is my only option
to wait for newer versions of the NDK or upgrade the compiler myself?

We are building with NDK7. Debug builds compile and run without
error.

Thanks,

Martin

David Turner

unread,
Nov 28, 2011, 9:59:01 AM11/28/11
to andro...@googlegroups.com
Hello Martin,

That definitely looks like a compiler bug. I recommend filing a new entry at b.android.com and attach a small source file that reproduces the problem, so that our compiler team can look at it.
Unfortunately, GCC 4.6 for the NDK is not ready yet for production (though we're working on it).

Regards

- David
 
Thanks,

Martin

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


dnick

unread,
Nov 28, 2011, 12:20:56 PM11/28/11
to andro...@googlegroups.com
Sorry, I was probably misunderstood.
    I tried custom gcc 4.6.2 that fixed only 'internal compile error' message, but there appeared other errors in compiling some of .cpp files with neon intrinsics (errors appear on temporary .s file compilation step now).

    In our company we still don't know how to fix this and decided rewrite the most of neon-intrinsic code with inline asm (...) equivalents using neon instructions.

    By the way - our research showed: in some cases, f.e. mul(matr43,matr43) - asm variant is faster than intrinsic's one x9 times (android gcc/release version, so 4.3.3 apparently has very bad intrinsic optimization). We tested the same code with iOS/llvmgcc - there was just about the same speed.
    But unfortunately, asm version of code with too many simple math operations (+,-,dot) becomes approximately x1.5-2 slower because of many unwanted vld/vst.

P.S.
    Anyway optimization better to start using only vfp3 instructions (there are too many devices without neon..=)

dnick

unread,
Nov 28, 2011, 4:10:25 PM11/28/11
to andro...@googlegroups.com
I've prepared related issue (another internal compile error appearing only with neon):
next time i'll try to simplify code for the subj's one..

dnick

unread,
Nov 28, 2011, 8:09:26 PM11/28/11
to andro...@googlegroups.com
Internal compiler error mentioned in subj issue:
http://code.google.com/p/android/issues/detail?id=22345

mingw android

unread,
Dec 1, 2011, 5:29:40 AM12/1/11
to andro...@googlegroups.com
Hi,

(I've emailed Nick about this already, but for the rest of the list):

I've updated the Windows version of my NDK to binutils 2.22 and with
GCC 4.6.2 + binutils 2.22, this is fixed.

http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50.20110709-linaro-gcc-462-binutils-222.windows.7z

Mac and Linux versions will follow in the next few days.

Cheers,

Ray.

On Tue, Nov 29, 2011 at 1:09 AM, dnick <nick.d...@gmail.com> wrote:
> Internal compiler error mentioned in subj issue:
> http://code.google.com/p/android/issues/detail?id=22345
>
>

> --
> You received this message because you are subscribed to the Google Groups
> "android-ndk" group.

> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-ndk/-/_PXfDi5zXMcJ.

Reply all
Reply to author
Forward
0 new messages