[llvm-bugs] [Bug 25544] New: clang-cl can't use _tzcnt_u32

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 16 10:52:38 PST 2015


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

            Bug ID: 25544
           Summary: clang-cl can't use _tzcnt_u32
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hans at chromium.org
                CC: echristo at gmail.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Example:

unsigned f(unsigned x) {
  return __tzcnt_u32(x);
}

bin\clang-cl -c /FIIntrin.h d:\src\tmp\a.c
a.c(2,10) :  error: always_inline function '__tzcnt_u32' requires
      target feature 'bmi', but would be inlined into function 'f' that is
      compiled without support for 'bmi'
  return __tzcnt_u32(x);
         ^ 


I think the problem is that on non-Windows we only expose these intrinsics when
BMI instructions are available on the target, but with MSVC they're always
exposed and emulated as necessary.


(This started showing up recently in Chromium after an ffmpeg update.)

-- 
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/20151116/e9c29197/attachment-0001.html>


More information about the llvm-bugs mailing list