aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/and-or-mask3u.c
blob: c5b6c5fa029180196247f47cad901652536cfef4 (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
#define W	3
#define	S	8
#define M	(W << S)

static inline int fun(unsigned int x, unsigned int y)
{
	return ((x & M) | (y << S)) >> S;
}

int foo(unsigned int x, unsigned int y)
{
	return fun(x, y) & W;
}

/*
 * check-name: and-or-mask3u
 * check-command: test-linearize -Wno-decl $file
 * check-known-to-fail
 *
 * check-output-ignore
 * check-output-pattern(1): lsr\\.
 * check-output-pattern(1): or\\.
 * check-output-pattern(1): and\\.
 * check-output-excludes: shl\\.
 */