new testcase
[oota-llvm.git] / test / CodeGen / PowerPC / and_add.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f
2 ; RUN: grep slwi %t
3 ; RUN: not grep addi %t
4 ; RUN: not grep rlwinm %t
5
6 int %test(int %A) {
7   %B = mul int %A, 8  ;; shift
8   %C = add int %B, 7  ;; dead, no demanded bits.
9   %D = and int %C, -8 ;; dead once add is gone.
10   ret int %D
11 }
12