llvm.org GIT mirror llvm / 4f7ae85
New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6900 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
1 changed file(s) with 19 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; Promoting some values allows promotion of other values.
1 ; RUN: if as < %s | opt -mem2reg | dis | grep alloca
2 ; RUN: then exit 1
3 ; RUN: else exit 0
4 ; RUN: fi
5
6 int %test2() {
7 %result = alloca int ; ty=int*
8 %a = alloca int ; ty=int*
9 %p = alloca int* ; ty=int**
10 store int 0, int* %a
11 store int* %a, int** %p
12 %tmp.0 = load int** %p ; ty=int*
13 %tmp.1 = load int* %tmp.0 ; ty=int
14 store int %tmp.1, int* %result
15 %tmp.2 = load int* %result ; ty=int
16 ret int %tmp.2
17 }
18