Excuse me, how has this discussion gone from Agner's speculation about flaw in Intel's compiler (which is bogus because CPUID is also tested in much the same way in legacy BIOS code) into this pointless discussion whether should ICC have separate AMD code path or not?!?
I say it shouldn't support AMD at all. Let AMD write their own compiler.
I deal with code optimization since Pentium MMX and if I recall correctly until very recently AMD didn't invest into popularization of code optimization a single cent. They couldn't teach anyone even if they wanted to, because their developer website is a mess -- it took me one hour to find a document which describes proper AMD CPU detection.
They always had their brute force approach as in "why waste time optimizing code when you can buy a faster CPU".
That was when they had faster CPUs. Now that they don't have faster CPUs they have started preaching about code optimization, hypocrits.
.................
Are "works fine" and "works optimally" synonyms for you?
AMD CPUs need separate code path.
Just of the top of my head:
1. AMD themselves said in their optimization manual for AMD64 that their CPUs prefer interleaved reads and writes while Intel prefers batched reads and writes. There are probably a lot more differences especially in instruction scheduling.
2. There are some old AMD CPUs with family and model < 6 which report SSE and SSE2 capability incorrectly.
3. AMD supports SSE3 but not MONITOR/MWAIT, if you allow it to execute the same SSE3 code path it will crash.
You can always patch the check and risk it. If you don't like it, don't use it. Period.
Bookmarks