When removing a function from the function set and adding it to deferred, we
[llvm.git] / test / Transforms / SCCP / apint-array.ll
blob1e75878f3aeb5675063f7e30b4e63ebc65ffec75
1 ; RUN: opt < %s -sccp -S | grep {ret i101 12}
3 @Y = constant [6 x i101] [ i101 12, i101 123456789000000, i101 -12,i101 
4 -123456789000000, i101 0,i101 9123456789000000]
6 define i101 @array()
8 Head:
9    %A = getelementptr [6 x i101]* @Y, i32 0, i32 1
11    %B = load i101* %A
12    %C = icmp sge i101 %B, 1
13    br i1 %C, label %True, label %False
14 True:
15    %D = and i101 %B, 1
16    %E = trunc i101 %D to i32
17    %F = getelementptr [6 x i101]* @Y, i32 0, i32 %E
18    %G = load i101* %F
19    br label %False
20 False:
21    %H = phi i101 [%G, %True], [-1, %Head]
22    ret i101 %H