blob: 30cc89098b8540de2dd3448807495e496572f002 [file] [log] [blame]
Chris Lattner8b3df482004-04-07 05:06:39 +00001// This file can be used to see what a native C compiler is generating for a
2// variety of interesting operations.
Reid Spencer77ac9ed2004-05-27 08:28:42 +00003//
4// RUN: $LLVMGCCDIR/bin/gcc -c %s
Chris Lattner8b3df482004-04-07 05:06:39 +00005unsigned int udiv(unsigned int X, unsigned int Y) {
6 return X/Y;
7}
8int sdiv(int X, int Y) {
9 return X/Y;
10}
11unsigned int urem(unsigned int X, unsigned int Y) {
12 return X%Y;
13}
14int 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