[all-commits] [llvm/llvm-project] 740086: [PowerPC] Fix issue with lowering byval parameters.

stefanp-ibm via All-commits all-commits at lists.llvm.org
Wed Oct 6 11:19:27 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 740086596c93952113220ed0c2fadcce0fa44832
      https://github.com/llvm/llvm-project/commit/740086596c93952113220ed0c2fadcce0fa44832
  Author: Stefan Pintilie <stefanp at ca.ibm.com>
  Date:   2021-10-06 (Wed, 06 Oct 2021)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/test/CodeGen/PowerPC/jaggedstructs.ll
    M llvm/test/CodeGen/PowerPC/ppc64-byval-multi-store.ll
    M llvm/test/CodeGen/PowerPC/structsinregs.ll

  Log Message:
  -----------
  [PowerPC] Fix issue with lowering byval parameters.

Lowering of byval parameters with sizes that are not represented by a single
store require multiple stores to properly address the correct size of the
parameter.

Sizes that cannot be done with a single store are 3 bytes, 5 bytes, 6 bytes,
7 bytes. It is not correct to simply perform an 8 byte store and for these
elements because then the store would be larger than the element and alias
analysis would assume that this is undefined behaivour and return NoAlias
for them.

This patch adds the correct stores so that the size of the store is not larger
than the size of the element.

Reviewed By: nemanjai, #powerpc

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




More information about the All-commits mailing list