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: unassignedclangb...@nondot.org
          Reporter: h...@chromium.org
                CC: echri...@gmail.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to