[RISCV] Fix ILP32D lowering for double+double/double+int return types
authorJames Clarke <jrtc27@jrtc27.com>
Tue, 14 Jan 2020 11:17:19 +0000 (11:17 +0000)
committerJames Clarke <jrtc27@jrtc27.com>
Tue, 14 Jan 2020 11:17:19 +0000 (11:17 +0000)
commit3d6c492d7a9830a1a39b85dfa215743581d52715
treed386e32b723c8cefa62ae4233b7a0ea147b6e7dc
parent4624a1e8ac8a3f69cc887403b976f538f587744a
[RISCV] Fix ILP32D lowering for double+double/double+int return types

Summary:
Previously, since these aggregates are > 2*XLen, Clang would think they
were being returned indirectly and thus would decrease the number of
available GPRs available by 1. For long argument lists this could lead
to a struct argument incorrectly being passed indirectly.

Reviewers: asb, lenary

Reviewed By: asb, lenary

Subscribers: luismarques, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, sameer.abuasal, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69590
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGen/riscv32-ilp32d-abi.c