Reid Spencer | eb1d74e | 2007-04-16 17:36:08 +0000 | [diff] [blame^] | 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 | ||||
Chris Lattner | f4f5f6b | 2006-03-13 06:50:47 +0000 | [diff] [blame] | 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 |