1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v5TE &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v5TE | grep "smulbt" | wc -l | grep 1 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v5TE | grep "smultt" | wc -l | grep 1 &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v5TE | grep "smlabt" | wc -l | grep 1
7 %x = weak global short 0
8 %y = weak global short 0
12 %tmp1 = add short %tmp, 2
13 %tmp2 = cast short %tmp1 to int
14 %tmp3 = shr int %y, ubyte 16
15 %tmp4 = mul int %tmp2, %tmp3
19 int %f2(int %x, int %y) {
20 %tmp1 = shr int %x, ubyte 16
21 %tmp3 = shr int %y, ubyte 16
22 %tmp4 = mul int %tmp3, %tmp1
26 int %f3(int %a, short %x, int %y) {
27 %tmp = cast short %x to int
28 %tmp2 = shr int %y, ubyte 16
29 %tmp3 = mul int %tmp2, %tmp
30 %tmp5 = add int %tmp3, %a