Re: [arm-gnu] NEON usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] NEON usage



On Tue, 2010-05-11 at 09:18 -0400, Daniel Jacobowitz wrote:
> On Tue, May 11, 2010 at 01:20:10PM +1000, James wrote:
> > $ arm-none-linux-gnueabi-gcc -O3 -march=armv7-a -mtune=cortex-a8
> > -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize
> > -ftree-vectorizer-verbose=5 -ffast-math -fvect-cost-model  -o neon
> > test.c
> > 
> > test.c:27: note: not vectorized: unsupported data-type int64_t
> > test.c:21: note: vectorized 0 loops in function.
> > 
> > But the ARM NEON Intrinsics here:
> > http://gcc.gnu.org/onlinedocs/gcc/ARM-NEON-Intrinsics.html
> > 
> > seems to suggest that 
> > 
> > int64x2_t vmlal_s32 (int64x2_t, int32x2_t, int32x2_t)
> > 
> > could be used?
> 
> Does it work any better with -mvectorize-with-neon-quad?

A different dummy spit, same result.

arm-none-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8
-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mvectorize-with-neon-quad
-O3 -ftree-vectorizer-verbose=5 -ffast-math -fvect-cost-model  -o
neonarm main.c

main.c:183: note: Vectorizing an unaligned access.
main.c:183: note: vect_model_load_cost: unaligned supported by hardware.
main.c:183: note: vect_model_load_cost: inside_cost = 2, outside_cost =
0 .
main.c:183: note: vect_model_load_cost: aligned.
main.c:183: note: vect_model_load_cost: inside_cost = 1, outside_cost =
0 .
main.c:183: note: vect_model_simple_cost: inside_cost = 1, outside_cost
= 0 .
main.c:183: note: not vectorized: relevant stmt not supported:
D.17919_37 = (int64_t) D.17918_36;

main.c:150: note: vectorized 0 loops in function.


> Currently released versions of GCC only support auto-vectorizing to a
> single size; either double or quad, but not both.  A future version
> will support automatic selection.  The infrastructure and some x86
> support is expected in GCC 4.6, but I don't know when the equivalent
> ARM pieces will be done.

Ok.  So for now it's a case of hand crafting intrinsics.

Regards,
James.