This is the first round of additions of missing builtins listed in the ABI document. More to come (this builds onto what seurer already addes). This patch adds:
vector signed long long vec_abs(vector signed long long)
vector double vec_abs(vector double) {
vector signed long long vec_add(vector signed long long, vector signed long long)
vector unsigned long long vec_add(vector unsigned long long, vector unsigned long long)
vector double vec_add(vector double, vector double)
vector double vec_and(vector bool long long, vector double)
vector double vec_and(vector double, vector bool long long)
vector double vec_and(vector double, vector double)
vector signed long long vec_and(vector signed long long, vector signed long long)
vector double vec_andc(vector bool long long, vector double)
vector double vec_andc(vector double, vector bool long long)
vector double vec_andc(vector double, vector double)
vector signed long long vec_andc(vector signed long long, vector signed long long)
vector double vec_ceil(vector double)
vector bool long long vec_cmpeq(vector double, vector double)
vector bool long long vec_cmpge(vector double, vector double)
vector bool long long vec_cmpge(vector signed long long, vector signed long long)
vector bool long long vec_cmpge(vector unsigned long long, vector unsigned long long)
vector bool long long vec_cmpgt(vector double, vector double)
vector bool long long vec_cmple(vector double, vector double)
vector bool long long vec_cmple(vector signed long long, vector signed long long)
vector bool long long vec_cmple(vector unsigned long long, vector unsigned long long)
vector bool long long vec_cmplt(vector double, vector double)
vector bool long long vec_cmplt(vector signed long long, vector signed long long)
vector bool long long vec_cmplt(vector unsigned long long, vector unsigned long long)
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Headers/altivec.h | ||
---|---|---|
780 | Not sure how I missed this here, but I've updated it in my patch: the missing "static" | |
1120 | Similar issue with missing "static" | |
1689 | Since the vector float version of this has a VSX and non-VSX version, I updated all of them to just forward the other function. In case we end up with VSX versions for the others as well, the logic does not have to be repeated. | |
test/CodeGen/builtins-ppc-p8vector.c | ||
4 | Added -target-feature +vsx to avoid errors about "vector double" and to generate the correct errors for functions that are only overloaded with VSX (vec_cmpge, vec_cmple). |
LGTM, with the changes you've identified and with a couple inline comments addressed. Thanks!
lib/Headers/altivec.h | ||
---|---|---|
797 | Just FYI -- the above three are listed in the test case I gave you as "low priority." It's fine that you added them, but for similarly marked ones please defer them until after unmarked ones are complete. (We are not exactly deprecating these, but they make little sense and we will be listing them in a separate table in the vector API -- "not recommended" or something. There is an overuse of vector bool, mixing it with other types where it doesn't make much sense.) | |
test/CodeGen/builtins-ppc-p8vector.c | ||
4 | This should be a comment in the test, not just in the review. |
Not sure how I missed this here, but I've updated it in my patch: the missing "static"