[llvm-bugs] [Bug 47423] New: [PowerPC] Overloads of vec_cmpne in altivec.h incorrectly guarded for Power9
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Sep 4 11:54:10 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47423
Bug ID: 47423
Summary: [PowerPC] Overloads of vec_cmpne in altivec.h
incorrectly guarded for Power9
Product: clang
Version: 10.0
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Headers
Assignee: unassignedclangbugs at nondot.org
Reporter: nemanja.i.ibm at gmail.com
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
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.
--
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/20200904/f6eb8e8b/attachment.html>
More information about the llvm-bugs
mailing list