This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Fix CSR_64_AllRegs_AIX_Dflt_VSX definition
Changes PlannedPublic

Authored by tingwang on Sep 8 2022, 6:33 PM.

Details

Reviewers
lkail
ZarkoCA
Group Reviewers
Restricted Project
Summary

According to AIX default ABI, the definition seems incorrect.

Base test case added in https://reviews.llvm.org/D133545.

Diff Detail

Event Timeline

tingwang created this revision.Sep 8 2022, 6:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2022, 6:33 PM
tingwang requested review of this revision.Sep 8 2022, 6:33 PM
lkail added a comment.Sep 8 2022, 6:51 PM

Please set https://reviews.llvm.org/D133545 as parent revision.

ZarkoCA added inline comments.Sep 9 2022, 2:41 PM
llvm/lib/Target/PowerPC/PPCCallingConv.td
365–366

Thanks for catching this.

I don't quite understand why it's ok to set it to 31 here even though it seems to work.

tingwang added inline comments.Sep 12 2022, 5:25 PM
llvm/lib/Target/PowerPC/PPCCallingConv.td
365–366

I just suspected the original definition does not align with AIX default ABI, since CSR_64_AllRegs_Altivec contains V20:31 which are reserved according to ABI, and I thought here CSR_64_AllRegs_AIX_Dflt_VSX should be defined as (<all registers> - <AIX default ABI reserved V20:31>).

Now it seems to me this error is harmless because no functional logic will trigger CSR_64_AllRegs_AIX_Dflt_VSX. (As notified by Kai Luo, JIT on AIX is not supported yet, and @llvm.experimental.patchpoint.void is not functional on AIX.) This may be the reason that only eye ball catches the error, not a broken test case.

tingwang planned changes to this revision.Sep 15 2022, 1:35 AM

Suspend this patch since the functionality is not supported on AIX.