blob: 767f035b4bef9b2c978777c5ba805873dc4905dd [file] [log] [blame]
Evan Cheng02b985c2007-01-19 09:20:23 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
2; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldrb" | wc -l | grep 1 &&
3; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldrsb" | wc -l | grep 1 &&
4; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldrh" | wc -l | grep 1 &&
5; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldrsh" | wc -l | grep 1
6
7int %test1(ubyte* %v) {
8 %tmp = load ubyte* %v
9 %tmp1 = cast ubyte %tmp to int
10 ret int %tmp1
11}
12
13int %test2(ushort* %v) {
14 %tmp = load ushort* %v
15 %tmp1 = cast ushort %tmp to int
16 ret int %tmp1
17}
18
19int %test3(sbyte* %v) {
20 %tmp = load sbyte* %v
21 %tmp1 = cast sbyte %tmp to int
22 ret int %tmp1
23}
24
25int %test4(short* %v) {
26 %tmp = load short* %v
27 %tmp1 = cast short %tmp to int
28 ret int %tmp1
29}