"David Mathog" <mat...@caltech.edu> writes:

> I compiled that with a target program and gprof showed
> all the time in resulting binary in the inlined functions.  It ran about
> 4X slower than the SSE2 hardware version, which is about what I
> expected.  So, so far so good.  What I am worried about now is that
> since it was invoked with "-msse2" the compiler may still be generating
> SSE2 calls within the inlined functions.  Is there a way to definitively
> disable this but still retain -msse2 on the command line?  

No.  If I understand what you are doing, I don't think you want to use
-msse2 at all.  In fact I think you want -mno-sse2.

> Actually, one thing I was never very clear on, do -msse2 -m3dnow
> etc. only provide access to the corresponding machine operations through
> the _mm* (or whatever) definitions in the header file, or does the
> compiler also figure out vector operations by itself during the
> optimization phase of compilation?

The latter: the compiler also figures out vector operations by itself,
particularly if you use the -ftree-vectorize option.

Ian

Reply via email to