Bug ID: 34079
           Summary: Windows: Cannot compile code that includes ppl.h with
                    SSE2 disabled due to _mm_pause usage
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend

If SSE2 is disabled (/arch:IA32 in VC), with an X86 target compiling code that
includes VC header ppl.h will result in errors such as: 

       (ClCompile target) -> 
         C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\include\concrt.h(636,21): error : '_mm_pause' needs target feature sse2
         C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\include\concrt.h(710,17): error : '_mm_pause' needs target feature sse2

I was about to report this problem to Microsoft, but on reading the Intel and
AMD docs for the PAUSE instruction, they say (respectively):


Since PAUSE is backwards compatible to all existing IA-32 architecture-based
processor generations, a test for processor type (a CPUID test) is not needed.
All legacy processors execute PAUSE instruction as a NOP, but in processors
that use the PAUSE instruction as a hint there can be significant performance


Processors that do not support PAUSE treat this opcode as a NOP instruction

The Microsoft compiler doesn't complain about the use of _mm_pause() with SSE2
disabled (and it generates PAUSE instructions).

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to