https://bugs.llvm.org/show_bug.cgi?id=34079

            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
          Assignee: unassignedclangb...@nondot.org
          Reporter: reupenl...@forward.cat
                CC: llvm-bugs@lists.llvm.org

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
[F:\foobar2000\columns_ui\ui_helpers\ui_helpers.vcxproj]
         C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\include\concrt.h(710,17): error : '_mm_pause' needs target feature sse2
[F:\foobar2000\columns_ui\ui_helpers\ui_helpers.vcxproj]

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

>From https://software.intel.com/en-us/node/524249:

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
benefit.

>From https://support.amd.com/TechDocs/24594.pdf:

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
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to