Add the SCCP regression tests for APInt expressions. These test cases
[oota-llvm.git] / test / Transforms / SCCP / apint-bigarray.ll
1 ; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f &&
2 ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep '%X'
3
4 @G =  global [1000000 x i10000] zeroinitializer
5
6 define internal i10000* @test(i10000 %Arg) {
7         %X = getelementptr [1000000 x i10000]* @G, i32 0, i32 999
8         store i10000 %Arg, i10000* %X
9         ret i10000* %X
10 }
11
12 define i10000 @caller()
13 {
14         %Y = call i10000* @test(i10000 -1)
15         %Z = load i10000* %Y
16         ret i10000 %Z 
17 }
18
19 define i10000 @caller2()
20 {
21         %Y = call i10000* @test(i10000 1)
22         %Z = load i10000* %Y
23         ret i10000 %Z 
24 }