aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/cmps-and0.c
blob: 097ec2f9f16c95b63ec24f3d1f921af717582a22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#define MINUS_ONE	-1
#define MASK		32


int cmps_and_lt_lt0(int a) { return ((a & MASK) <  MINUS_ONE)  + 1; }
int cmps_and_lt_gtm(int a) { return ((a & MASK) <  (MASK + 1)) + 0; }
int cmps_and_le_lt0(int a) { return ((a & MASK) <= MINUS_ONE)  + 1; }
int cmps_and_le_gtm(int a) { return ((a & MASK) <= (MASK + 1)) + 0; }

int cmps_and_gt_lt0(int a) { return ((a & MASK) >  MINUS_ONE)  + 0; }
int cmps_and_gt_gtm(int a) { return ((a & MASK) >  (MASK + 1)) + 1; }
int cmps_and_ge_lt0(int a) { return ((a & MASK) >= MINUS_ONE)  + 0; }
int cmps_and_ge_gtm(int a) { return ((a & MASK) >= (MASK + 1)) + 1; }

/*
 * check-name: cmps-and0
 * check-command: test-linearize -Wno-decl $file
 * check-known-to-fail
 *
 * check-output-ignore
 * check-output-returns: 1
 */