blob: 85bcaf4d2db4a0aa67ae419fb8a698992bbe52d3 [file] [log] [blame]
Dan Gohman66c80212009-09-11 18:17:12 +00001; RUN: opt < %s -ipsccp -S > %t
Dan Gohman29474e92008-07-23 00:34:11 +00002; 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}