aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/canonical-cmps-sel.c
blob: f0a0effc795459f17a8dac005aa181d8a96d8a03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
_Bool sel_lts(int a, int b, int x, int y)
{
	return ((a < b) ? x : y) == ((a >= b) ? y : x);
}
_Bool sel_les(int a, int b, int x, int y)
{
	return ((a <= b) ? x : y) == ((a > b) ? y : x);
}

_Bool sel_ltu(unsigned int a, unsigned int b, int x, int y)
{
	return ((a < b) ? x : y) == ((a >= b) ? y : x);
}
_Bool sel_leu(unsigned int a, unsigned int b, int x, int y)
{
	return ((a <= b) ? x : y) == ((a > b) ? y : x);
}

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