1 ; All of these ands and shifts should be folded into rlwimi's
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f
3 ; RUN: not grep mulhwu %t
4 ; RUN: not grep srawi %t
6 ; RUN: grep mulhw %t | count 1
8 implementation ; Functions:
10 int %mulhs(int %a, int %b) {
12 %tmp.1 = cast int %a to ulong ; <ulong> [#uses=1]
13 %tmp.3 = cast int %b to ulong ; <ulong> [#uses=1]
14 %tmp.4 = mul ulong %tmp.3, %tmp.1 ; <ulong> [#uses=1]
15 %tmp.6 = shr ulong %tmp.4, ubyte 32 ; <ulong> [#uses=1]
16 %tmp.7 = cast ulong %tmp.6 to int ; <int> [#uses=1]