blob: fda40f53fe1f721c6b26ad080dde74f4cbd0e3ab [file] [log] [blame]
Dan Gohman3c7d3082009-09-11 18:01:28 +00001; RUN: opt < %s -ipsccp -S | grep -v {ret i512 undef} | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002; RUN: grep {ret i8 2}
3
4define internal i512 @test(i1 %B) {
5 br i1 %B, label %BB1, label %BB2
6BB1:
7 %Val = add i512 0, 1
8 br label %BB3
9BB2:
10 br label %BB3
11BB3:
12 %Ret = phi i512 [%Val, %BB1], [2, %BB2]
13 ret i512 %Ret
14}
15
16define i8 @caller()
17{
18 %t1 = and i2 2, 1
19 %t11 = trunc i2 %t1 to i1
20 %t2 = call i512 @test(i1 %t11)
21 %t3 = trunc i512 %t2 to i8
22 ret i8 %t3
23}
24