blob: 3b26d5b041e0d902e77244c12fdd36abc866ed6e [file] [log] [blame]
Dan Gohman5bb7c7c2009-09-08 22:34:10 +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