Jeff Cohen | b02fbfc | 2005-04-23 21:26:11 +0000 | [diff] [blame] | 1 | // This file can be used to see what a native C compiler is generating for a |
Chris Lattner | 8b3df48 | 2004-04-07 05:06:39 +0000 | [diff] [blame] | 2 | // variety of interesting operations. |
Reid Spencer | 77ac9ed | 2004-05-27 08:28:42 +0000 | [diff] [blame] | 3 | // |
Chris Lattner | a11bcdf | 2004-11-07 00:33:14 +0000 | [diff] [blame] | 4 | // RUN: %llvmgcc -c %s -o - | llc |
| 5 | |
Chris Lattner | 8b3df48 | 2004-04-07 05:06:39 +0000 | [diff] [blame] | 6 | unsigned int udiv(unsigned int X, unsigned int Y) { |
| 7 | return X/Y; |
| 8 | } |
| 9 | int sdiv(int X, int Y) { |
| 10 | return X/Y; |
| 11 | } |
| 12 | unsigned int urem(unsigned int X, unsigned int Y) { |
| 13 | return X%Y; |
| 14 | } |
| 15 | int srem(int X, int Y) { |
| 16 | return X%Y; |
| 17 | } |
| 18 | |
| 19 | _Bool setlt(int X, int Y) { |
| 20 | return X < Y; |
| 21 | } |
| 22 | |
| 23 | _Bool setgt(int X, int Y) { |
| 24 | return X > Y; |
| 25 | } |
Jeff Cohen | b02fbfc | 2005-04-23 21:26:11 +0000 | [diff] [blame] | 26 | |