summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/mem_update.ll
blob: 8be4f73135ad3535360edb45d86ab51a0f583c62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
; RUN: llvm-as < %s | llc -march=ppc32 &&
; RUN: llvm-as < %s | llc -march=ppc32 | not grep addi

; XFAIL: *

int *%test0(int *%X,  int *%dest) {
	%Y = getelementptr int* %X, int 4
	%A = load int* %Y
	store int %A, int* %dest
	ret int* %Y
}

int *%test1(int *%X,  int *%dest) {
	%Y = getelementptr int* %X, int 4
	%A = load int* %Y
	store int %A, int* %dest
	ret int* %Y
}

short *%test2(short *%X, int *%dest) {
	%Y = getelementptr short* %X, int 4
	%A = load short* %Y
	%B = cast short %A to int
	store int %B, int* %dest
	ret short* %Y
}

ushort *%test3(ushort *%X, int *%dest) {
	%Y = getelementptr ushort* %X, int 4
	%A = load ushort* %Y
	%B = cast ushort %A to int
	store int %B, int* %dest
	ret ushort* %Y
}


long *%test4(long *%X, long *%dest) {
	%Y = getelementptr long* %X, int 4
	%A = load long* %Y
	store long %A, long* %dest
	ret long* %Y
}