Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp | ||
---|---|---|
74 | Do these generic entries actually exist in MASS (ie can link correctly)? | |
77 | why not just check for Subtarget->hasP10Vector()? | |
llvm/test/Transforms/LoopVectorize/PowerPC/massv-altivec.ll | ||
16 | I'm wondering if it is possible to get these _P8 calls in the IR in any other way (ie does clang generate them to implement any of the builtins)? |
llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp | ||
---|---|---|
74 | Yes, these entries exist in AIX and Linux MASS (xlopt library). So they will link correctly. | |
77 | Currently, on Linux or AIX, if user compile for P10, we will get the _P9 version (not _P8). This patch doesn't propose any changing behavior for Linux. On linux, if you have -mcpu=pwr10 you will still getting _P9 version (not an fatal error) even after this patch applied. (when target is P10, both hasP9Vector() and hasP8Vector() are returning true) On linux MASS, there are still no entities with suffix _P10. It is possible to add them in MASS (which will be P9 optimized MASS functions but only with suffix _P10 for now) and remove the check for` isAIXABI()` in this pass. With above explanations, do you still think this is more desirable? | |
llvm/test/Transforms/LoopVectorize/PowerPC/massv-altivec.ll | ||
16 | I am not aware of any builtin calls which are resolving to MASS calls in compiler. And I think there is none. Clang may (or will) resolve some builtin to math calls but (it seems) not to MASS calls. I think MASS calls are only generated in MASS pass(es). I tired to find any other place that clang/LLVM generate calls to _P8 (or any other MASS functions) but I couldn't find. |
LGTM with a request to add a TODO comment.
llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp | ||
---|---|---|
77 | Ultimately the check would have to be changed to check for P10 only (regardless of the OS), but we can do that later and my main concern was about change of behaviour. I guess there would still be a difference in behaviour for someone compiling with -mcpu=pwr10 -Xclang -target-feature -Xclang -power9-vector but probably nobody is doing that. | |
llvm/test/Transforms/LoopVectorize/PowerPC/massv-altivec.ll | ||
16 | Ok, thanks for checking. |
Do these generic entries actually exist in MASS (ie can link correctly)?