[llvm-bugs] [Bug 34079] New: Windows: Cannot compile code that includes ppl.h with SSE2 disabled due to _mm_pause usage

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Aug 5 02:28:17 PDT 2017


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: unassignedclangbugs at nondot.org
          Reporter: reupenllvm at forward.cat
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170805/95ea86f3/attachment.html>


More information about the llvm-bugs mailing list