603a8b2780635b682169c86253ceddee8fe57f2b
[oota-llvm.git] / test / CodeGen / ARM / load.ll
1 ; RUN: llvm-as < %s | llc -march=arm &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep ldrsb &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep ldrb &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep ldrsh &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep ldrh
6
7 int %f1(sbyte* %p) {
8 entry:
9         %tmp = load sbyte* %p           ; <sbyte> [#uses=1]
10         %tmp = cast sbyte %tmp to int           ; <int> [#uses=1]
11         ret int %tmp
12 }
13
14 int %f2(ubyte* %p) {
15 entry:
16         %tmp = load ubyte* %p           ; <sbyte> [#uses=1]
17         %tmp = cast ubyte %tmp to int           ; <int> [#uses=1]
18         ret int %tmp
19 }
20
21 int %f3(short* %p) {
22 entry:
23         %tmp = load short* %p           ; <sbyte> [#uses=1]
24         %tmp = cast short %tmp to int           ; <int> [#uses=1]
25         ret int %tmp
26 }
27
28 int %f4(ushort* %p) {
29 entry:
30         %tmp = load ushort* %p          ; <sbyte> [#uses=1]
31         %tmp = cast ushort %tmp to int          ; <int> [#uses=1]
32         ret int %tmp
33 }