llvm.org GIT mirror llvm / 95481b1
New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12201 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 15 years ago
1 changed file(s) with 21 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -argpromotion -instcombine | not grep load
1
2 %QuadTy = type {int, int, int, int}
3
4 %G = constant %QuadTy {int 0, int 0, int 17, int 25 }
5
6 implementation
7
8 internal int %test(%QuadTy* %P) {
9 %A = getelementptr %QuadTy* %P, long 0, ubyte 3
10 %B = getelementptr %QuadTy* %P, long 0, ubyte 2
11 %a = load int* %A
12 %b = load int* %B
13 %V = add int %a, %b
14 ret int %V
15 }
16
17 int %caller() {
18 %V = call int %test(%QuadTy* %G)
19 ret int %V
20 }