<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 - [PowerPC] Overloads of vec_cmpne in altivec.h incorrectly guarded for Power9"
href="https://bugs.llvm.org/show_bug.cgi?id=47423">47423</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[PowerPC] Overloads of vec_cmpne in altivec.h incorrectly guarded for Power9
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</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>nemanja.i.ibm@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>According to Appendix A of the ELFv2 ABI specification, the availability of the
vec_cmpne overloads is not predicated on ISA 3.0. However, the implementation
in Clang is.
To reproduce:
#include <altivec.h>
vector bool int test(vector signed int a, vector signed int b) {
return vec_cmpne(a, b);
}
Compile:
$ clang -O3 b.c -S -o - -mcpu=power8
b.c:3:10: warning: implicit declaration of function 'vec_cmpne' is invalid in
C99 [-Wimplicit-function-declaration]
return vec_cmpne(a, b);
^
b.c:3:10: error: returning 'int' from a function with incompatible result type
'__vector __bool unsigned int' (vector of 4 'unsigned int' values)
return vec_cmpne(a, b);
^~~~~~~~~~~~~~~
1 warning and 1 error generated.</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>