aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM/str_pre.ll
blob: ad085b690c994818228f0fb6282b9b1bf46fc259 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "str.*\!"  | wc -l | grep 2

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

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