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: unassignedclangb...@nondot.org
Reporter: nemanja.i....@gmail.com
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs