-msse, -Xhost...

-msse, -Xhost...

It's really not clear to me how the following options interact...icpc -march=pentium4 -mtune=pentium4 -Xhost -msse -msse2 -msse3 -mssse3 -msse4.1I'm building a local binary on an i7 CPU. Which, if any, of the above should I use? Willicpc -Xhostget my everything I need?

Oliver 'kfs1' Smith,
Lead Server Programmer,
Cornered Rat Software / Battleground Europe
3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

If you "need" the maximum number of code paths for different architectures, -xhost won't do that; it will make only the -xsse4.2 path. Remember that ssse3 path is likely to be slower than the others when running on i7, and the compilers which support these notations don't support sse without sse2. -march=pentium4 should be a synonym for -msse2. If -mtune=pentium4 were observed, it would be detrimental on i7. I agree it's hard to predict the effect of specifying an excessive number of architecture options.

To clarify, If you're really building a binary to run only on the machine that you're building on (or other machines of the same type), just use "-xHost" and that should be your best bet in general. As Tim points out, there's no point in specifying a bunch of other architectures as that could confuse things while not adding anything.


Leave a Comment

Please sign in to add a comment. Not a member? Join today