[all-commits] [llvm/llvm-project] 585c85: [PowerPC] Fix lowering of byval parameters for siz...

stefanp-ibm via All-commits all-commits at lists.llvm.org
Thu Mar 31 13:13:05 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 585c85abe545a42a47a3b3d0411b91421e9552e9
      https://github.com/llvm/llvm-project/commit/585c85abe545a42a47a3b3d0411b91421e9552e9
  Author: Stefan Pintilie <stefanp at ca.ibm.com>
  Date:   2022-03-31 (Thu, 31 Mar 2022)

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

  Log Message:
  -----------
  [PowerPC] Fix lowering of byval parameters for sizes greater than 8 bytes.

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.

Reviewed By: nemanjai, #powerpc, quinnp, amyk

Differential Revision: https://reviews.llvm.org/D121430




More information about the All-commits mailing list