<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [X86] Intrinsics _bit_scan_forward is hidden when _MSC_VER is defined"
href="https://bugs.llvm.org/show_bug.cgi?id=33722">33722</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[X86] Intrinsics _bit_scan_forward is hidden when _MSC_VER is defined
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Headers
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zvi.rackover@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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 {
entry:
%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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>