aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/fact-ior-shift.c
blob: 07fdf80604dc2a861b15e0fa95dec004a076808c (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
27
typedef unsigned int uint;
typedef   signed int sint;


uint fact_ior_shl(uint a, uint b, uint s)
{
	return ((a << s) | (b << s)) == ((a | b) << s);
}

uint fact_ior_lsr(uint a, uint b, uint s)
{
	return ((a >> s) | (b >> s)) == ((a | b) >> s);
}

sint fact_ior_asr(sint a, sint b, sint s)
{
	return ((a >> s) | (b >> s)) == ((a | b) >> s);
}

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