blob: 141d32bbc0949f4103e82136168955355ed47ac9 [file] [log] [blame]
Jeff Cohenb02fbfc2005-04-23 21:26:11 +00001// This file can be used to see what a native C compiler is generating for a
Chris Lattner8b3df482004-04-07 05:06:39 +00002// variety of interesting operations.
Reid Spencer77ac9ed2004-05-27 08:28:42 +00003//
Chris Lattnera11bcdf2004-11-07 00:33:14 +00004// RUN: %llvmgcc -c %s -o - | llc
5
Chris Lattner8b3df482004-04-07 05:06:39 +00006unsigned 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}
Jeff Cohenb02fbfc2005-04-23 21:26:11 +000026