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