[PATCH] Generic vectors 3/3

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Thu Apr 7 08:29:00 GMT 2005


This patch enables generic vectorization.  A new vector-lowering pass is 
scheduled after the vectorizer if the vectorizer has run and
vectorizable_operation is told not to do worthless generic 
vectorization: for example on 32-bit systems and 'short' values it is 
worthless to vectorize addition, but it is ok to vectorize bitwise 
operations.

The patch fixes vect-82.c and vect-83.c (vectorizing the initialization 
of an array of long longs).  They failed because the vectorizer didn't 
find a 128-bit vector mode for long longs, but now it finds TImode and 
uses it to produce vectorized code.

The patch does not fix vect-7.c on Alpha (which lacks addv8qi3), a 
follow-up patch will.  I also have a patch that prefers NOP_EXPR to 
VIEW_CONVERT_EXPR if possible in tree-complex.c; this will improve the 
generated code.

The patch also includes DejaGNU surgery so that the SIMD instructions 
are not enabled for all vect.exp tests.  What I did is looking for the 
vect_int, vect_float etc. dg-require-effective-target keywords; if one 
of them is found, either we enable the SIMD instructions, or we skip the 
test if they are not available.

I added several new tests that mimic those for hardware-supported 
vectorization.  Bootstrapped/regtested powerpc-apple-darwin7.8.0 with no 
regressions and with the new passes I mentioned.  Ok for mainline?

Paolo

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vect-generic-enable.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050407/3dbc1a37/attachment.ksh>


More information about the Gcc-patches mailing list