Chris Lattner | babac05 | 2005-10-07 06:10:03 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | llc -march=ppc32 | not grep srawi && |
2 | ; RUN: llvm-as < %s | llc -march=ppc32 | grep blr | ||||
3 | |||||
Chris Lattner | a77e86e | 2005-10-07 15:27:12 +0000 | [diff] [blame] | 4 | int %test1(int %X) { |
Chris Lattner | babac05 | 2005-10-07 06:10:03 +0000 | [diff] [blame] | 5 | %Y = and int %X, 15 |
6 | %Z = div int %Y, 4 | ||||
7 | ret int %Z | ||||
8 | } | ||||
Chris Lattner | a77e86e | 2005-10-07 15:27:12 +0000 | [diff] [blame] | 9 | |
10 | int %test2(int %W) { | ||||
11 | %X = and int %W, 15 | ||||
12 | %Y = sub int 16, %X | ||||
13 | %Z = div int %Y, 4 | ||||
14 | ret int %Z | ||||
15 | } | ||||
16 | |||||
17 | int %test3(int %W) { | ||||
18 | %X = and int %W, 15 | ||||
19 | %Y = sub int 15, %X | ||||
20 | %Z = div int %Y, 4 | ||||
21 | ret int %Z | ||||
22 | } | ||||
23 | |||||
24 | int %test4(int %W) { | ||||
25 | %X = and int %W, 2 | ||||
26 | %Y = sub int 5, %X | ||||
27 | %Z = div int %Y, 2 | ||||
28 | ret int %Z | ||||
29 | } |