[PATCH] D121430: [PowerPC] Fix lowering of byval parameters for sizes greater than 8 bytes.

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 17:28:31 PST 2022


stefanp created this revision.
stefanp added reviewers: lei, nemanjai.
Herald added subscribers: shchenz, kbarton, hiraditya.
Herald added a project: All.
stefanp requested review of this revision.
Herald added a project: LLVM.

To store a byval parameter the existing code would store as many 8 byte elements
as was required to store the full size of the byval parameter.
For example, a paramter of size 16 would store two element of 8 bytes.
A paramter of size 12 would also store two elements of 8 bytes.
This would sometimes store too many bytes as the size of the paramter is not
always a factor of 8.

This patch fixes that issue and now byval paramters are stored with the correct
number of bytes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121430

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/test/CodeGen/PowerPC/ppc64-byval-larger-struct.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121430.414534.patch
Type: text/x-patch
Size: 41650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220311/79d38f1b/attachment.bin>


More information about the llvm-commits mailing list