This is an archive of the discontinued LLVM Phabricator instance.

[PowePC][AIX] Handle variadic vector call operands.
ClosedPublic

Authored by sfertile on Mar 4 2021, 8:22 AM.

Details

Summary

Patch adds support for passing vector call operands to variadic functions. Arguments which are fixed shadow GPRs and stack space even when they are passed in vector registers, while arguments passed through ellipses are passed in(properly aligned GPRs if available and on the stack once all GPR arguments registers are consumed.

Diff Detail

Event Timeline

sfertile created this revision.Mar 4 2021, 8:22 AM
sfertile requested review of this revision.Mar 4 2021, 8:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2021, 8:22 AM
ZarkoCA added inline comments.Mar 4 2021, 3:03 PM
llvm/test/CodeGen/PowerPC/aix-vector-vararg-caller.ll
5

nit: prefix instead of prefixes

70

Nit: An empty line between 32 and 64Bit.

70

Empty line between 32 and 64bit.

llvm/test/CodeGen/PowerPC/aix-vector-vararg-fixed-caller.ll
5

nit: prefix instead of prefixes

cebowleratibm requested changes to this revision.Mar 5 2021, 7:32 AM
cebowleratibm added inline comments.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
7123
&& ArgLocs[I].getValNo() == OriginalValNo

I don't think there is such a case right now, but if the next arg happened to be an unrelated custom reg for another argument, you don't want to consume it.

This revision now requires changes to proceed.Mar 5 2021, 7:32 AM
sfertile updated this revision to Diff 328542.Mar 5 2021, 8:55 AM
  • clang-formated lambda
  • changed check-prefixes to check-prefix
  • added whitespace between 32-bit and 64-bit check lines
  • Changed check for further custom RegLcos to include that the ValNo of the next RegLoc is the same as the original ValNo.
cebowleratibm accepted this revision.Mar 5 2021, 11:54 AM
This revision is now accepted and ready to land.Mar 5 2021, 11:54 AM
This revision was landed with ongoing or failed builds.Mar 6 2021, 10:51 AM
This revision was automatically updated to reflect the committed changes.