Original discussion here: http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00751.html This patch enables vector conversions for ARM NEON architecture. In its current state vectorizer can't handle type conversions in the hottest loop of libmp3lame on NEON since its backend doesn't have appropriate builtins for type conversion. For x86_64 and rs6000 architectures that also can vectorize conversions the default behavior is retained. We have rewritten condition in vectorizable_conversion() in tree-vect-stmts.c for the case of NONE modifier. Now It first looks in convert_optab for suitable operation and then in builtins. Regtested with arm-qemu ok. Initially few tests failed (gcc.dg/vect/slp-10.c, gcc.dg/vect/slp-11c.c, gcc.dg/vect/slp-33.c, gcc.dg/vect/fast-math-pr35982.c) because now it vectorizes more loops than they expected to. We adjusted target-supports.exp so vectorizable conversions and even/odd extractions are now supported for NEON. Ok for trunk? 2011-10-20 Dmitry Plotnikov gcc/ * tree-cfg.c (verify_gimple_assign_unary): Allow vector conversions. * tree-vect-stmts.c (supportable_convert_operation): New function. (vectorizable_conversion): Call it. Change condition and behavior for NONE modifier case. * tree-vectorizer.h (supportable_convert_operation): New prototype. * tree.h (VECTOR_INTEGER_TYPE_P): New macro. gcc/config/arm/ * neon.md (floatv2siv2sf2): New. (floatunsv2siv2sf2): New. (fix_truncv2sfv2si2): New. (fix_truncunsv2sfv2si2): New. (floatv4siv4sf2): New. (floatunsv4siv4sf2): New. (fix_truncv4sfv4si2): New. (fix_truncunsv4sfv4si2): New. gcc/testsuite/ * gcc.target/arm/vect-vcvt.c: New test. * gcc.target/arm/vect-vcvtq.c: New test. gcc/testsuite/lib/ * target-supports.exp (check_effective_target_vect_intfloat_cvt): True for ARM NEON. (check_effective_target_vect_uintfloat_cvt): Likewise. (check_effective_target_vect_intfloat_cvt): Likewise. (check_effective_target_vect_floatuint_cvt): Likewise. (check_effective_target_vect_floatint_cvt): Likewise. (check_effective_target_vect_extract_even_odd): Likewise.