Adding usage of VSSRC and VSFRC when adding the live in registers on AIX.
This matches the behaviour of the rest of PPC Subtargets.
Details
- Reviewers
sfertile cebowleratibm nemanjai jsji qiucf - Group Reviewers
Restricted Project - Commits
- rGee6ca9c7dfd9: [AIX] Use VSSRC/VSFRC Register classes for f32/f64 callee arguments on P8 and…
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Added comment to clarify getRegClassforSVT() is only used by AIX.
Modified test case.
llvm/test/CodeGen/PowerPC/aix-p8vector-liveins.ll | ||
---|---|---|
6 | I could do that if you feel strongly about it but I'd like the test case to be associated with this patch since we already have many AIX calling convention test cases. I don't think adding it alone add any value besides what this patch will show and in that case, in my opinion, it's better to have in the patch. I did add a RUN step for running with -mcpu=pwr8 but with -power8-vector to show try and address your concern in some way. Does that work? |
llvm/test/CodeGen/PowerPC/aix-p8vector-liveins.ll | ||
---|---|---|
6 | Got it. Actually this also looks good :-) since we can easily tell the difference between pwr7 and pwr8. We may not need -mcpu=pwr8 -mattr=-power8-vector here? I think that option set should be just for testing pwr8 scheduling under pwr7 instructions only. |
- Remove no-p8-vector RUN line
- use Register instead of unsigned for Reg variable as per clang-tidy check
llvm/test/CodeGen/PowerPC/aix-p8vector-liveins.ll | ||
---|---|---|
2 | Maybe it's missing REQUIRES:asserts or -debug-only won't work. -stop-after=finalize-isel should work already? IIRC, machine-cp is a very late pass. |
- Use vsfr when the target has vsx not only on P8 and above
- use stop-after=finalize-isel instead of debug-only option
llvm/test/CodeGen/PowerPC/aix-p8vector-liveins.ll | ||
---|---|---|
2 | Thank you, that is much better. |
Other than a small test case nit, LGTM.
llvm/test/CodeGen/PowerPC/aix-p8vector-liveins.ll | ||
---|---|---|
7 | I think you should probably also have a PWR7 VSX run line since we will use VSFRC for f64 with that combination (i.e. we don't need Power8 vector in order to use VSFRC). |
Better to comment it if this method is only for AIX?