I am using Viusual Studio 2010 and Intel C++ Composer Update 6, that is ICL XE 2011 SP1
When I compile project (in MSVC environment) with "/Qip" (==single file, simple intra-unit optimizations), everythings works just fine.
But when I change it to "/Qipo" (==optimizes by regarding multiple files/units/extern calls) - and there is NOTHING I have change in MSVC configuration, expect for this option (changed from /Qip to /Qipo) - I get Windows exception "Invalid OP code" upon run/execute. Next thing to do was to use unassembling feature of MSVC, and I fond strange call in this case: literalily:
--- snip ---
000000013F6506AA call __intel_sse4_strlen (13F396CB0h)
--- snip ---
This code is causing a crash of the application, because I have Intel CPU, that can't handle SSE4, but only SSE3 or below versions of streaming instructions.
NB: I have in both cases set-up MSVC to use "/QxHost" switch, so it should be working without exception "Illegal instruction" mentioned above.
Too bad I don't have time to write small test-case to reproduce this bug.
But IMHO it is a rather bug in ICL. It is not honoring CPU type when I use /QxHOST in MSVC.
PS: /arch:SSE3 indeed resolved my issue... But I wish to use /QxHOST to make my code more portable to get all benefits from CPU that my code is compiled on. Please, could you file a bug report to intel?
To give an example, it's not unusual to see /QxSSE3 or /QxSSE4.1 giving better performance on Westmere than /QxHost.
There is no way anyone can file a bug report without all the necessary details; supposing that you have an AMD CPU for which /QxHost is erroneously choosing SSE4.1, the exact identity of that CPU would be a necessary detail.
Also, there are issues (compile errors) in SP1 with /MP, it couldn't open *.tlog files because of locking them by other instances of running compiler.
PS: I'd like to use /QxHOST, because I am the only user of my project, and the project is intended only for my own purposes on my own machine.
I know for sure, I have Intel Core 2 Quad Q6700, 2.66 GHz, overclocked to 2.72 GHz.
Even Processor ID Utility is stating that. It reports SSE3 is the highest supported streaming extension. Other information it provides is SSE4=no, AVX=no, AES new instructions=no, Virtualization techs.=yes, hyperthreading=no, I64Arch.=yes; CPUID data: type=0, family=6, model=F, Stepping=B, and revision=B6; LGA775 socket; NX bit=yes, Enhanced Halt State=yes; Chipset ID=2916.
Running MSVC 2010, on Vista Ultimate x64.
There should be filed a bug report.