[PATCH] D108795: [PowerPC] Fix issue with lowering byval parameters.

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 26 17:49:58 PDT 2021


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

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108795

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108795.369013.patch
Type: text/x-patch
Size: 40036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210827/9699ad3d/attachment.bin>


More information about the llvm-commits mailing list