make sure this test tests the intended target.
[oota-llvm.git] / test / CodeGen / X86 / shift-double.llx
1 ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -disable-pattern-isel=0 | grep sh[lr]d | wc -l | grep 5
2
3 ; This is currently xfailed, because the expander for long shifts needed to 
4 ; change and the X86 BE was not updated to match.  FIXME.
5 ; XFAIL: *
6
7 long %test1(long %X, ubyte %C) {
8         %Y = shl long %X, ubyte %C
9         ret long %Y
10 }
11 long %test2(long %X, ubyte %C) {
12         %Y = shr long %X, ubyte %C
13         ret long %Y
14 }
15 ulong %test3(ulong %X, ubyte %C) {
16         %Y = shr ulong %X, ubyte %C
17         ret ulong %Y
18 }
19
20 uint %test4(uint %A, uint %B, ubyte %C) {
21         %X = shl uint %A, ubyte %C
22         %Cv = sub ubyte 32, %C
23         %Y = shr uint %B, ubyte %Cv
24         %Z = or uint %Y, %X
25         ret uint %Z
26 }
27
28 ushort %test5(ushort %A, ushort %B, ubyte %C) {
29         %X = shl ushort %A, ubyte %C
30         %Cv = sub ubyte 16, %C
31         %Y = shr ushort %B, ubyte %Cv
32         %Z = or ushort %Y, %X
33         ret ushort %Z
34 }