1 ; All of these ands and shifts should be folded into rlwimi's
2 ; RUN: llvm-as < rlwinm.ll | llc -march=ppc32 | not grep and &&
3 ; RUN: llvm-as < rlwinm.ll | llc -march=ppc32 | grep rlwinm | wc -l | grep 8
5 implementation ; Functions:
9 %tmp.1 = and int %a, 268431360 ; <int> [#uses=1]
15 %tmp.1 = and int %a, -268435441 ; <int> [#uses=1]
21 %tmp.2 = shr int %a, ubyte 8 ; <int> [#uses=1]
22 %tmp.3 = and int %tmp.2, 255 ; <int> [#uses=1]
26 uint %test4(uint %a) {
28 %tmp.3 = shr uint %a, ubyte 8 ; <uint> [#uses=1]
29 %tmp.4 = and uint %tmp.3, 255 ; <uint> [#uses=1]
35 %tmp.2 = shl int %a, ubyte 8 ; <int> [#uses=1]
36 %tmp.3 = and int %tmp.2, -8388608 ; <int> [#uses=1]
42 %tmp.1 = and int %a, 65280 ; <int> [#uses=1]
43 %tmp.2 = shr int %tmp.1, ubyte 8 ; <uint> [#uses=1]
47 uint %test7(uint %a) {
49 %tmp.1 = and uint %a, 65280 ; <uint> [#uses=1]
50 %tmp.2 = shr uint %tmp.1, ubyte 8 ; <uint> [#uses=1]
56 %tmp.1 = and int %a, 16711680 ; <int> [#uses=1]
57 %tmp.2 = shl int %tmp.1, ubyte 8 ; <int> [#uses=1]