Use the llvm-upgrade program to upgrade llvm assembly.
[oota-llvm.git] / test / CodeGen / X86 / shift-double.llx
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep sh[lr]d | wc -l | grep 5
2
3 long %test1(long %X, ubyte %C) {
4         %Y = shl long %X, ubyte %C
5         ret long %Y
6 }
7 long %test2(long %X, ubyte %C) {
8         %Y = shr long %X, ubyte %C
9         ret long %Y
10 }
11 ulong %test3(ulong %X, ubyte %C) {
12         %Y = shr ulong %X, ubyte %C
13         ret ulong %Y
14 }
15
16 uint %test4(uint %A, uint %B, ubyte %C) {
17         %X = shl uint %A, ubyte %C
18         %Cv = sub ubyte 32, %C
19         %Y = shr uint %B, ubyte %Cv
20         %Z = or uint %Y, %X
21         ret uint %Z
22 }
23
24 ushort %test5(ushort %A, ushort %B, ubyte %C) {
25         %X = shl ushort %A, ubyte %C
26         %Cv = sub ubyte 16, %C
27         %Y = shr ushort %B, ubyte %Cv
28         %Z = or ushort %Y, %X
29         ret ushort %Z
30 }