2005-04-23 23:26:11 +02:00
|
|
|
// This file can be used to see what a native C compiler is generating for a
|
2004-04-07 07:06:39 +02:00
|
|
|
// variety of interesting operations.
|
2004-05-27 10:28:42 +02:00
|
|
|
//
|
2009-12-05 01:02:37 +01:00
|
|
|
// RUN: %llvmgcc -S %s -o - | llc
|
2004-11-07 01:33:14 +01:00
|
|
|
|
2004-04-07 07:06:39 +02: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 23:26:11 +02:00
|
|
|
|