Chris Lattner | 6a135f2 | 2004-04-07 04:08:21 +0000 | [diff] [blame] | 1 | ; New testcase, this contains a bunch of simple instructions that should be |
| 2 | ; handled by a code generator. |
| 3 | |
Reid Spencer | 7dde37d | 2004-05-27 20:49:16 +0000 | [diff] [blame] | 4 | ; RUN: llvm-as < %s | llc |
Chris Lattner | 6a135f2 | 2004-04-07 04:08:21 +0000 | [diff] [blame] | 5 | |
| 6 | int %add(int %A, int %B) { |
| 7 | %R = add int %A, %B |
| 8 | ret int %R |
| 9 | } |
| 10 | |
| 11 | int %sub(int %A, int %B) { |
| 12 | %R = sub int %A, %B |
| 13 | ret int %R |
| 14 | } |
| 15 | |
| 16 | int %mul(int %A, int %B) { |
| 17 | %R = mul int %A, %B |
| 18 | ret int %R |
| 19 | } |
| 20 | |
| 21 | int %sdiv(int %A, int %B) { |
| 22 | %R = div int %A, %B |
| 23 | ret int %R |
| 24 | } |
| 25 | |
| 26 | uint %udiv(uint %A, uint %B) { |
| 27 | %R = div uint %A, %B |
| 28 | ret uint %R |
| 29 | } |
| 30 | |
| 31 | int %srem(int %A, int %B) { |
| 32 | %R = rem int %A, %B |
| 33 | ret int %R |
| 34 | } |
| 35 | |
| 36 | uint %urem(uint %A, uint %B) { |
| 37 | %R = rem uint %A, %B |
| 38 | ret uint %R |
| 39 | } |
| 40 | |
| 41 | int %and(int %A, int %B) { |
| 42 | %R = and int %A, %B |
| 43 | ret int %R |
| 44 | } |
| 45 | |
| 46 | int %or(int %A, int %B) { |
| 47 | %R = or int %A, %B |
| 48 | ret int %R |
| 49 | } |
| 50 | |
| 51 | int %xor(int %A, int %B) { |
| 52 | %R = xor int %A, %B |
| 53 | ret int %R |
| 54 | } |