• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -ipsccp -S | grep -v "ret i512 undef" | \
2; 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
25