<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 - Mixing inline and ifunc confuses clang"
href="https://bugs.llvm.org/show_bug.cgi?id=47691">47691</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Mixing inline and ifunc confuses clang
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rafael@espindo.la
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24010" name="attach_24010" title="testcas">attachment 24010</a> <a href="attachment.cgi?id=24010&action=edit" title="testcas">[details]</a></span>
testcas
Compile twice with
$ clang++ -Os -S -o test1.s test.cc -DINLINE=
$ clang++ -Os -S -o test2.s test.cc -DINLINE=inline
The first file has the expected result:
_Z9foobarzedPvS_.avx2: # @_Z9foobarzedPvS_.avx2
.cfi_startproc
# %bb.0:
vlddqu (%rdi), %ymm0
vlddqu (%rsi), %ymm1
vpcmpgtq %ymm1, %ymm0, %ymm0
vpmovmskb %ymm0, %eax
vzeroupper
retq
In the second one it looks like clang sees declarations for the avx functions:
_Z9foobarzedPvS_.avx2: # @_Z9foobarzedPvS_.avx2
.cfi_startproc
# %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %rbx
andq $-32, %rsp
subq $224, %rsp
.cfi_offset %rbx, -24
movq %rsi, %rbx
callq _ZL18_mm256_lddqu_si256PKDv4_x</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>