blob: 61145387815f26cadf28df8c4e2e76f52db36a25 [file] [log] [blame]
Chris Lattner4f7ae852003-06-25 14:55:30 +00001; Promoting some values allows promotion of other values.
2; RUN: if as < %s | opt -mem2reg | dis | grep alloca
3; RUN: then exit 1
4; RUN: else exit 0
5; RUN: fi
6
7int %test2() {
8 %result = alloca int ; ty=int*
9 %a = alloca int ; ty=int*
10 %p = alloca int* ; ty=int**
11 store int 0, int* %a
12 store int* %a, int** %p
13 %tmp.0 = load int** %p ; ty=int*
14 %tmp.1 = load int* %tmp.0 ; ty=int
15 store int %tmp.1, int* %result
16 %tmp.2 = load int* %result ; ty=int
17 ret int %tmp.2
18}
19