blob: 0f1c3806ce3e42990ddc3b9331e468f3f6f47f4a [file] [log] [blame]
Dan Gohman29474e92008-07-23 00:34:11 +00001; RUN: llvm-as < %s | opt -ipsccp | llvm-dis > %t
2; RUN: grep {ret i32 36} %t
Chris Lattner99f648a2009-03-01 00:25:46 +00003; RUN: grep {%mrv = insertvalue %T undef, i32 18, 0} %t
4; RUN: grep {%mrv1 = insertvalue %T %mrv, i32 17, 1} %t
5; RUN: grep {ret %T %mrv1} %t
6
7%T = type {i32,i32}
Devang Pateladd320d2008-03-11 05:46:42 +00008
9define internal {i32, i32} @bar(i32 %A) {
Chris Lattnera2b8e382008-04-23 03:49:32 +000010 %X = add i32 1, %A
11 ret i32 %X, i32 %A
Devang Pateladd320d2008-03-11 05:46:42 +000012}
13
14define i32 @foo() {
15 %X = call {i32, i32} @bar(i32 17)
16 %Y = getresult {i32, i32} %X, 0
Chris Lattnera2b8e382008-04-23 03:49:32 +000017 %Z = add i32 %Y, %Y
18 ret i32 %Z
Devang Pateladd320d2008-03-11 05:46:42 +000019}