blob: 1f6428a430097a988a729f826a1cb48b6f92a91c [file] [log] [blame]
Reid Spencereb1d74e2007-04-16 17:36:08 +00001; 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
Chris Lattnerf4f5f6b2006-03-13 06:50:47 +00005
6int %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