DAG: move sret demotion into most basic LowerCallTo implementation.
authorTim Northover <tnorthover@apple.com>
Wed, 18 Jun 2014 11:52:44 +0000 (11:52 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 18 Jun 2014 11:52:44 +0000 (11:52 +0000)
commit5393254646553a919753f0bca76dfc2dd56fb26b
tree0dfd56e030e721434b853f259dcc3d79cffabb4d
parentef592db349f87eda79ac645602b5ec93929e20d8
DAG: move sret demotion into most basic LowerCallTo implementation.

It looks like there are two versions of LowerCallTo here: the
SelectionDAGBuilder one is designed to operate on LLVM IR, and the
TargetLowering one in the case where everything is at DAG level.

Previously, only the SelectionDAGBuilder variant could handle demoting
an impossible return to sret semantics (before delegating to the
TargetLowering version), but this functionality is also useful for
certain libcalls (e.g. 128-bit operations on 32-bit x86).  So this
commit moves the sret handling down a level.

rdar://problem/17242889

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211155 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/X86/libcall-sret.ll [new file with mode: 0644]