Add a couple rlwinm tests for bitfield clears
[oota-llvm.git] / test / CodeGen / PowerPC / rlwinm.ll
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 2
4
5 implementation   ; Functions:
6
7 int %test1(int %a) {
8 entry:
9         %tmp.1 = and int %a, 268431360          ; <int> [#uses=1]
10         ret int %tmp.1
11 }
12
13 int %test2(int %a) {
14 entry:
15         %tmp.1 = and int %a, -268435441         ; <int> [#uses=1]
16         ret int %tmp.1
17 }