[PATCH] D133547: [PowerPC] Fix CSR_64_AllRegs_AIX_Dflt_VSX definition

Ting Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 17:25:15 PDT 2022


tingwang added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCCallingConv.td:365-366
 
-def CSR_64_AllRegs_AIX_Dflt_VSX : CalleeSavedRegs<(add CSR_64_AllRegs_Altivec,
-                                         (sequence "VSL%u", 0, 19))>;
+def CSR_64_AllRegs_AIX_Dflt_VSX : CalleeSavedRegs<(add CSR_64_AllRegs_AIX_Dflt_Altivec,
+                                         (sequence "VSL%u", 0, 31))>;
 
----------------
ZarkoCA wrote:
> 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. 
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.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133547/new/

https://reviews.llvm.org/D133547



More information about the llvm-commits mailing list