This patch enables passing non variadic vector type parameters on the caller and callee side and vector return on AIX that are passed in vector registers only.
So far, support is enabled for only the AIX extended Altivec ABI Calling convention.
Paths
| Differential D86476
[AIX] Add support for non var_arg extended vector ABI calling convention on AIX ClosedPublic Authored by ZarkoCA on Aug 24 2020, 10:33 AM.
Details Summary This patch enables passing non variadic vector type parameters on the caller and callee side and vector return on AIX that are passed in vector registers only. So far, support is enabled for only the AIX extended Altivec ABI Calling convention.
Diff Detail
Unit TestsFailed Event Timeline
Comment Actions
Yes, the patch is in the changes planned state. I will rebase when I put it up again. Comment Actions We are in a poor position since this depends on D75059 which I never commit-ed since as I realized it was not really NFC because we were wrongly inserting VR_SAVE code for AIX. This had the effect of emitting a fatal error if we used vector arguments, return values and I believe if we selected any vector instructions. I never went back and updated it because there was always something higher priority to work on. I have a non-NFC update I haven't posted which relies on the calling convention lowering to emit an error when passing vector arguments, and I add an error when returning vector arguments. I will post that shortly. This patch is trying implement 2 related but distinct things
The test for 1 will have a problem since the dependent patch will change to emitting an error for the return of a vector type. The second thing has no test coverage in this test. I suggest we put this patch on hold, and then proceed with:
Then we can either rework the lit test here to not return vector types and try to land this patch first, or enable vector returns (I think it will work as it, but we need lit test coverage). ZarkoCA retitled this revision from [AIX] Add support for vector parameters in LowerFormalArguments_AIX to [AIX] Add support for non var_arg extended vector ABI calling convention on AIX. Comment ActionsThis patch now only contains the ISel lowering portion of the previous version. Additionally, lowering on the callee side was implemented since with the work already contained in CC_AIX only the removal of the error in LowerCall_AIX() was required. Return vector types was also enabled. The test case checks the caller, callee and return assembly instructions. Comment Actions Hi Zarko, the patch is out of sync with master branch, could you update it?
Comment Actions Rebased based on new changes in https://reviews.llvm.org/D88676. ZarkoCA added inline comments.
ZarkoCA marked an inline comment as done. Comment ActionsAddressed comments and adding parent revisions. This revision is now accepted and ready to land.Nov 19 2020, 6:04 AM
ZarkoCA marked an inline comment as done. Comment ActionsRemoved passing vector parameters to the stack portion of patch, fixed test case and added test cases for errors. Comment Actions Sorry Zarko, I must have deleted my comment before posting last night I've added it back now.
Closed by commit rG6d648e69c094: [AIX] Add support for non var_arg extended vector ABI calling convention on AIX (authored by ZarkoCA). · Explain WhyNov 26 2020, 9:04 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 287442 llvm/lib/Target/PowerPC/PPCCallingConv.td
llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
llvm/lib/Target/PowerPC/PPCSubtarget.h
llvm/test/CodeGen/PowerPC/aix-cc-vector.ll
|
clang-format: please reformat the code
20 diff lines are omitted. See full path.