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