Try to fix an SDAG dependence issue with sret
authorReid Kleckner <reid@kleckner.net>
Mon, 12 May 2014 22:01:27 +0000 (22:01 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 12 May 2014 22:01:27 +0000 (22:01 +0000)
commit17335ce80f1356b67c556285ed6359fdd3670817
treee676289b1f4576c5ef2261961d188d7ccea799e9
parent03e19bb235ee4e7840ae3905fc38fd92dda05bd2
Try to fix an SDAG dependence issue with sret

r208453 added support for having sret on the second parameter.  In that
change, the code for copying sret into a virtual register was hoisted
into the loop that lowers formal parameters.  This caused a "Wrong
topological sorting" assertion failure during scheduling when a
parameter is passed in memory.  This change undoes that by creating a
second loop that deals with sret.

I'm worried that this fix is incomplete.  I don't fully understand the
dependence issues.  However, with this change we produce the same DAGs
we used to produce, so if they are broken, they are just as broken as
they have always been.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208637 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/x86-64-sret-return-2.ll [new file with mode: 0644]