Find out GCC optimizations of -march -mtune etc

If you want to check what optimizations your current gcc settings give you, you need to use:

echo | gcc -dM -E - -march=native

You can then grep the output to check stuff like MMX, SSE or 3dNOW.

To test a specific setting, like “-march=x86-64 -msse3” :

echo | gcc -dM -E - -march=x86-64 -msse3

To see what gcc recommends for your platform:

echo | gcc -dM -E - -march=native
Advertisements
This entry was posted in Burger Thoughts, C, Cpp, Software and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s