1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
2 ; RUN: grep {ro\[rl\]} | count 12
4 uint %rotl32(uint %A, ubyte %Amt) {
5 %B = shl uint %A, ubyte %Amt
6 %Amt2 = sub ubyte 32, %Amt
7 %C = shr uint %A, ubyte %Amt2
12 uint %rotr32(uint %A, ubyte %Amt) {
13 %B = shr uint %A, ubyte %Amt
14 %Amt2 = sub ubyte 32, %Amt
15 %C = shl uint %A, ubyte %Amt2
20 uint %rotli32(uint %A) {
21 %B = shl uint %A, ubyte 5
22 %C = shr uint %A, ubyte 27
27 uint %rotri32(uint %A) {
28 %B = shr uint %A, ubyte 5
29 %C = shl uint %A, ubyte 27
34 ushort %rotl16(ushort %A, ubyte %Amt) {
35 %B = shl ushort %A, ubyte %Amt
36 %Amt2 = sub ubyte 16, %Amt
37 %C = shr ushort %A, ubyte %Amt2
42 ushort %rotr16(ushort %A, ubyte %Amt) {
43 %B = shr ushort %A, ubyte %Amt
44 %Amt2 = sub ubyte 16, %Amt
45 %C = shl ushort %A, ubyte %Amt2
50 ushort %rotli16(ushort %A) {
51 %B = shl ushort %A, ubyte 5
52 %C = shr ushort %A, ubyte 11
57 ushort %rotri16(ushort %A) {
58 %B = shr ushort %A, ubyte 5
59 %C = shl ushort %A, ubyte 11
64 ubyte %rotl8(ubyte %A, ubyte %Amt) {
65 %B = shl ubyte %A, ubyte %Amt
66 %Amt2 = sub ubyte 8, %Amt
67 %C = shr ubyte %A, ubyte %Amt2
72 ubyte %rotr8(ubyte %A, ubyte %Amt) {
73 %B = shr ubyte %A, ubyte %Amt
74 %Amt2 = sub ubyte 8, %Amt
75 %C = shl ubyte %A, ubyte %Amt2
80 ubyte %rotli8(ubyte %A) {
81 %B = shl ubyte %A, ubyte 5
82 %C = shr ubyte %A, ubyte 3
87 ubyte %rotri8(ubyte %A) {
88 %B = shr ubyte %A, ubyte 5
89 %C = shl ubyte %A, ubyte 3