aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/and-or-mask4.c
blob: 1c4bc01a89f12782111a985df7c827e9c8b7bacb (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 & W) | (y >> S)) << S;
}

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

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