Removed the -mode option.
[oota-llvm.git] / test / Transforms / Mem2Reg / PromoteMemToRegister.ll
1 ; Simple sanity check testcase.  Both alloca's should be eliminated.
2 ; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep 'alloca'
3
4 implementation
5
6 double "testfunc"(int %i, double %j)
7 begin
8         %I = alloca int
9         %J = alloca double
10
11         store int %i, int* %I
12         store double %j, double* %J
13
14         %t1 = load int* %I
15         %t2 = add int %t1, 1
16         store int %t2, int* %I
17
18         %t3 = load int* %I
19         %t4 = cast int %t3 to double
20         %t5 = load double* %J
21         %t6 = mul double %t4, %t5
22
23         ret double %t6
24 end