1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-02 00:42:52 +01:00
llvm-mirror/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll
Chris Lattner 6a45cf9dd6 Add support for multiple-return values in inline asm. This should
get inline asm working as well as it did previously with the CBE
with the new MRV support for inline asm.

llvm-svn: 51420
2008-05-22 06:19:37 +00:00

20 lines
446 B
LLVM

; RUN: llvm-as < %s | llc -march=c
declare {i32, i32} @foo()
define i32 @test() {
%A = call {i32, i32} @foo()
%B = getresult {i32, i32} %A, 0
%C = getresult {i32, i32} %A, 1
%D = add i32 %B, %C
ret i32 %D
}
define i32 @test2() {
%A = call {i32, i32} asm sideeffect "...", "={cx},={di},~{dirflag},~{fpsr},~{flags},~{memory}"()
%B = getresult {i32, i32} %A, 0
%C = getresult {i32, i32} %A, 1
%D = add i32 %B, %C
ret i32 %D
}