We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to the xlc documentation (https://www.ibm.com/support/knowledgecenter/SSXVZZ_16.1.1/com.ibm.compilers.linux.doc/compiler.pdf?view=kc, page 501), the following variants of vec_sel should be available:
vector bool long long vec_sel(vector bool long long vector bool long long, vector bool long long);
vector bool long long vec_sel(vector bool long long vector bool long long, vector unsigned long long);
vector signed long long vec_sel(vector signed long long vector signed long long, vector bool long long);
vector signed long long vec_sel(vector signed long long vector signed long long, vector unsigned long long);
vector unsigned long long vec_sel(vector unsigned long long vector unsigned long long, vector bool long long);
vector unsigned long long vec_sel(vector unsigned long long vector unsigned long long, vector unsigned long long);
However, in clang the only variants declared in altivec.h for 64-bit types have vector double for the first two arguments and the return value.
Reproducing is pretty straightforward, just enable -Wvector-conversion and try to call one of the functions. For example:
#include <altivec.h>
vector signed long long foo(vector signed long long a, vector signed long long b, vector unsigned long long c) { return vec_sel(a, b, c); }
Here it is on Compiler Explorer: https://godbolt.org/z/x71Gnj
The text was updated successfully, but these errors were encountered:
Fixed by https://reviews.llvm.org/D94162
Sorry, something went wrong.
No branches or pull requests
Extended Description
According to the xlc documentation (https://www.ibm.com/support/knowledgecenter/SSXVZZ_16.1.1/com.ibm.compilers.linux.doc/compiler.pdf?view=kc, page 501), the following variants of vec_sel should be available:
vector bool long long
vec_sel(vector bool long long
vector bool long long,
vector bool long long);
vector bool long long
vec_sel(vector bool long long
vector bool long long,
vector unsigned long long);
vector signed long long
vec_sel(vector signed long long
vector signed long long,
vector bool long long);
vector signed long long
vec_sel(vector signed long long
vector signed long long,
vector unsigned long long);
vector unsigned long long
vec_sel(vector unsigned long long
vector unsigned long long,
vector bool long long);
vector unsigned long long
vec_sel(vector unsigned long long
vector unsigned long long,
vector unsigned long long);
However, in clang the only variants declared in altivec.h for 64-bit types have vector double for the first two arguments and the return value.
Reproducing is pretty straightforward, just enable -Wvector-conversion and try to call one of the functions. For example:
#include <altivec.h>
vector signed long long
foo(vector signed long long a,
vector signed long long b,
vector unsigned long long c) {
return vec_sel(a, b, c);
}
Here it is on Compiler Explorer: https://godbolt.org/z/x71Gnj
The text was updated successfully, but these errors were encountered: