blob: d6041f644febb40995e8b7492d51db0cc3934142 [file] [log] [blame]
Chris Lattner95481b12004-03-08 00:58:19 +00001; RUN: llvm-as < %s | opt -argpromotion -instcombine | not grep load
2
3%QuadTy = type {int, int, int, int}
4
5%G = constant %QuadTy {int 0, int 0, int 17, int 25 }
6
7implementation
8
9internal int %test(%QuadTy* %P) {
10 %A = getelementptr %QuadTy* %P, long 0, ubyte 3
11 %B = getelementptr %QuadTy* %P, long 0, ubyte 2
12 %a = load int* %A
13 %b = load int* %B
14 %V = add int %a, %b
15 ret int %V
16}
17
18int %caller() {
19 %V = call int %test(%QuadTy* %G)
20 ret int %V
21}