blob: 603a8b2780635b682169c86253ceddee8fe57f2b [file] [log] [blame]
Rafael Espindola82c678b2006-10-16 17:17:22 +00001; 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
7int %f1(sbyte* %p) {
8entry:
9 %tmp = load sbyte* %p ; <sbyte> [#uses=1]
10 %tmp = cast sbyte %tmp to int ; <int> [#uses=1]
11 ret int %tmp
12}
13
14int %f2(ubyte* %p) {
15entry:
16 %tmp = load ubyte* %p ; <sbyte> [#uses=1]
17 %tmp = cast ubyte %tmp to int ; <int> [#uses=1]
18 ret int %tmp
19}
20
21int %f3(short* %p) {
22entry:
23 %tmp = load short* %p ; <sbyte> [#uses=1]
24 %tmp = cast short %tmp to int ; <int> [#uses=1]
25 ret int %tmp
26}
27
28int %f4(ushort* %p) {
29entry:
30 %tmp = load ushort* %p ; <sbyte> [#uses=1]
31 %tmp = cast ushort %tmp to int ; <int> [#uses=1]
32 ret int %tmp
33}