2005-04-23 21:26:11 +00:00
|
|
|
// This file can be used to see what a native C compiler is generating for a
|
2004-04-07 05:06:39 +00:00
|
|
|
// variety of interesting operations.
|
2004-05-27 08:28:42 +00:00
|
|
|
//
|
2006-11-03 22:01:15 +00:00
|
|
|
// RUN: %llvmgcc -S %s -o - | llvm-as | llc
|
2004-11-07 00:33:14 +00:00
|
|
|
|
2004-04-07 05:06:39 +00:00
|
|
|
unsigned int udiv(unsigned int X, unsigned int Y) {
|
|
|
|
return X/Y;
|
|
|
|
}
|
|
|
|
int sdiv(int X, int Y) {
|
|
|
|
return X/Y;
|
|
|
|
}
|
|
|
|
unsigned int urem(unsigned int X, unsigned int Y) {
|
|
|
|
return X%Y;
|
|
|
|
}
|
|
|
|
int srem(int X, int Y) {
|
|
|
|
return X%Y;
|
|
|
|
}
|
|
|
|
|
|
|
|
_Bool setlt(int X, int Y) {
|
|
|
|
return X < Y;
|
|
|
|
}
|
|
|
|
|
|
|
|
_Bool setgt(int X, int Y) {
|
|
|
|
return X > Y;
|
|
|
|
}
|
2005-04-23 21:26:11 +00:00
|
|
|
|