2d0a577bc407cd6fc86937b7f06405aeee907f20
[oota-llvm.git] / test / Transforms / DSAnalysis / arraymerge.ll
1 ; This testcase is used to make sure that the outer element of arrays are 
2 ; folded completely away if possible.  This is a very common case, so it should
3 ; be efficient.
4 ;
5 implementation
6
7 sbyte* %merge1([100 x sbyte] *%A, long %N) {
8         %P = getelementptr [100 x sbyte] *%A, long 0, long %N
9         ret sbyte* %P
10 }
11
12 sbyte* %merge2([100 x sbyte] *%A, long %N) {
13         ; The graph for this example should end up exactly the same as for merge1
14         %P1 = getelementptr [100 x sbyte] *%A, long 0, long 0
15         %P2 = getelementptr sbyte* %P1, long %N
16         ret sbyte* %P2
17 }
18