OSDN Git Service

Merging r370430:
authorHans Wennborg <hans@hanshq.net>
Thu, 5 Sep 2019 10:50:25 +0000 (10:50 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 5 Sep 2019 10:50:25 +0000 (10:50 +0000)
commita083ac115fc670051ccd8484406704d6740e7681
tree462926159fdddaab5b4fddc6291430589253f066
parentc5d3eed5bcf785279ddceb1feb15ce53ee3c5b2a
Merging r370430:
------------------------------------------------------------------------
r370430 | djg | 2019-08-30 06:33:22 +0200 (Fri, 30 Aug 2019) | 12 lines

[CodeGen] Fix lowering for returning the result of an extractvalue

When the number of return values exceeds the number of registers available,
SelectionDAGBuilder::visitRet transforms a function's return to use a
pointer to a buffer to hold return values. When the returned value is an
operator such as extractvalue, the value may have a non-zero result number.
Add that number to the indexing when obtaining the values to store.

This fixes https://bugs.llvm.org/show_bug.cgi?id=43132.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371053 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/WebAssembly/multi-return.ll [new file with mode: 0644]