blob: ceed17c2ba9adfc04651577794861d225678181e [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001// This file can be used to see what a native C compiler is generating for a
2// variety of interesting operations.
3//
Dan Gohman2b62af22009-12-05 00:02:37 +00004// RUN: %llvmgcc -S %s -o - | llc
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005
6unsigned int udiv(unsigned int X, unsigned int Y) {
7 return X/Y;
8}
9int sdiv(int X, int Y) {
10 return X/Y;
11}
12unsigned int urem(unsigned int X, unsigned int Y) {
13 return X%Y;
14}
15int 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}
26