[llvm-bugs] [Bug 30506] New: <intrin.h> does not declare _tzcnt_u32

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 23 11:09:36 PDT 2016


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

            Bug ID: 30506
           Summary: <intrin.h> does not declare _tzcnt_u32
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: froydnj at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Firefox's copy of FFmpeg includes <intrin.h> on MSVC to get access to
_tzcnt_u32:

https://dxr.mozilla.org/mozilla-central/source/media/ffvpx/libavutil/x86/intmath.h#26

This is the same as upstream:

https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/x86/intmath.h#L26

Upstream FFmpeg used to include <immintrin.h> for the same purpose
(<immintrin.h> declares it in MSVC, which is included by MSVC's <intrin.h>),
until that was discovered to not work on older MSVC installations:

https://github.com/FFmpeg/FFmpeg/commit/f98417451291a3ff6719d739b5e904e0b7bf404b

Unfortunately, clang-cl's <intrin.h> doesn't declare _tzcnt_u32, which breaks
compiling Firefox.

-- 
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/20160923/6ff116cf/attachment.html>


More information about the llvm-bugs mailing list