[llvm-bugs] [Bug 33722] New: [X86] Intrinsics _bit_scan_forward is hidden when _MSC_VER is defined

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jul 9 10:47:14 PDT 2017


            Bug ID: 33722
           Summary: [X86] Intrinsics _bit_scan_forward is hidden when
                    _MSC_VER is defined
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Headers
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zvi.rackover at intel.com
                CC: llvm-bugs at lists.llvm.org

cat test.c:

 #define _MSC_VER
 #include <immintrin.h>

 int test_bit_scan_forward(int a) {
   return _bit_scan_forward(a);

clang -cc1 -internal-isystem llvm/build/lib/clang/5.0.0/include -nostdsysteminc
-ffreestanding -trip
le x86_64-unknown-unknown -emit-llvm -o - test.c

results with:

define i32 @test_bit_scan_forward(i32 %a) #0 {
  %a.addr = alloca i32, align 4
  store i32 %a, i32* %a.addr, align 4
  %0 = load i32, i32* %a.addr, align 4
  %call = call i32 (i32, ...) bitcast (i32 (...)* @_bit_scan_forward to i32
(i32, ...)*)(i32 %0) #2
  ret i32 %call

declare i32 @_bit_scan_forward(...) #1

'_bit_scan_forward' is an intrinsics function which is lowered to an external
function call.

Same issue with _bit_scan_reverse.

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/20170709/ee290c5f/attachment.html>

More information about the llvm-bugs mailing list