Skip to content
New issue

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

[ppc] vec_sel variants missing #46114

Closed
llvmbot opened this issue Jul 18, 2020 · 1 comment
Closed

[ppc] vec_sel variants missing #46114

llvmbot opened this issue Jul 18, 2020 · 1 comment
Labels
backend:PowerPC bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Member

llvmbot commented Jul 18, 2020

Bugzilla Link 46770
Resolution FIXED
Resolved on Jan 11, 2021 18:06
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @ecnelises,@nemanjai

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

@llvmbot
Copy link
Member Author

llvmbot commented Jan 6, 2021

Fixed by https://reviews.llvm.org/D94162

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:PowerPC bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

1 participant