enable this test, check ppc64 as well.
[oota-llvm.git] / test / CodeGen / PowerPC / mem_update.ll
1 ; RUN: llvm-as < %s | llc -march=ppc32 -enable-ppc-preinc &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 -enable-ppc-preinc | not grep addi &&
3 ; RUN: llvm-as < %s | llc -march=ppc64 -enable-ppc-preinc &&
4 ; RUN: llvm-as < %s | llc -march=ppc64 -enable-ppc-preinc | not grep addi
5
6 int *%test0(int *%X,  int *%dest) {
7         %Y = getelementptr int* %X, int 4
8         %A = load int* %Y
9         store int %A, int* %dest
10         ret int* %Y
11 }
12
13 int *%test1(int *%X,  int *%dest) {
14         %Y = getelementptr int* %X, int 4
15         %A = load int* %Y
16         store int %A, int* %dest
17         ret int* %Y
18 }
19
20 short *%test2(short *%X, int *%dest) {
21         %Y = getelementptr short* %X, int 4
22         %A = load short* %Y
23         %B = cast short %A to int
24         store int %B, int* %dest
25         ret short* %Y
26 }
27
28 ushort *%test3(ushort *%X, int *%dest) {
29         %Y = getelementptr ushort* %X, int 4
30         %A = load ushort* %Y
31         %B = cast ushort %A to int
32         store int %B, int* %dest
33         ret ushort* %Y
34 }
35
36
37 long *%test4(long *%X, long *%dest) {
38         %Y = getelementptr long* %X, int 4
39         %A = load long* %Y
40         store long %A, long* %dest
41         ret long* %Y
42 }