[PATCH][RFH] (3/3) Vectorize some builtins on x86_64 by using libgcc-math

Joseph S. Myers joseph@codesourcery.com
Fri Nov 17 16:13:00 GMT 2006

On Fri, 17 Nov 2006, Paolo Bonzini wrote:

> > > I think the solution is just to put these tests in libgcc-math.dg/vect,
> > > though
> > > somebody else's opinion may be more valuable than mine.
> > >     
> > 
> > It affects all tests that use -ftree-vectorize (which at the moment,
> > maybe wrongly so, causes us to link against libgcc-math).  I'm open to
> > suggestions, but if you mean moving all vect testcases to the libgcc-math
> > testsuite that doesn't sound right.  Or wasn't this what you suggested?
> >   
> I missed that all vectorized programs link against libgcc-math.  I don't know
> if this is okay...  this definitely looks like a series of patches that should
> be reviewed by a GWP...

If this is a shared library, then the link command line (generated by gcc 
when linking with -ftree-vectorize) should at least use --as-needed 
-lgcc-math --no-as-needed (if USE_LD_AS_NEEDED) to avoid dependencies on 
libgcc-math for programs that don't in fact need it.

Joseph S. Myers

More information about the Gcc-patches mailing list