blob: ee3bc1e99257122a30c0e53ff2a9d08e506d7eda [file] [log] [blame]
Chris Lattner7c79de72005-01-19 06:30:36 +00001; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -disable-pattern-isel=0 | grep sh[lr]d | wc -l | grep 4
2
3long %test1(long %X, ubyte %C) {
4 %Y = shl long %X, ubyte %C
5 ret long %Y
6}
7long %test2(long %X, ubyte %C) {
8 %Y = shr long %X, ubyte %C
9 ret long %Y
10}
11ulong %test3(ulong %X, ubyte %C) {
12 %Y = shr ulong %X, ubyte %C
13 ret ulong %Y
14}
15
16uint %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}