[llvm-commits] [llvm] r48244 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Chris Lattner clattner at apple.com
Fri Mar 21 10:02:37 PDT 2008


On Mar 11, 2008, at 2:11 PM, Dan Gohman wrote:

> Author: djg
> Date: Tue Mar 11 16:11:25 2008
> New Revision: 48244
>
> URL: http://llvm.org/viewvc/llvm-project?rev=48244&view=rev
> Log:
> Initial codegen support for functions and calls with multiple return  
> values.

Very nice Dan!  However, this doesn't handle the case when getresult  
is in a different block than the call:

declare {x86_fp80, x86_fp80} @test()

define void @call2(x86_fp80 *%P1, x86_fp80 *%P2) {
   %a = call {x86_fp80,x86_fp80} @test()
   %b = getresult {x86_fp80,x86_fp80} %a, 1
   store x86_fp80 %b, x86_fp80* %P1
br label %L

L:
   %c = getresult {x86_fp80,x86_fp80} %a, 0
   store x86_fp80 %c, x86_fp80* %P2
   ret void
}


I think the best way to handle this is to make CodeGenPrepare move  
getresults into the same block as the call.  What do you think?

-Chris



More information about the llvm-commits mailing list