aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/sh-or-and1.c
blob: 7b79bbf32a7cbf75d3385204e20ee70878ee2e5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
unsigned lsr_or_and1(unsigned x, unsigned b)
{
	return (((x & 0xfffff000) | b) >> 12);
}

unsigned shl_or_and1(unsigned x, unsigned b)
{
	return (((x & 0x000fffff) | b) << 12);
}

/*
 * check-name: sh-or-and1
 * check-command: test-linearize -Wno-decl $file
 *
 * check-output-ignore
 * check-output-pattern(1): lsr\\.
 * check-output-pattern(1): shl\\.
 * check-output-pattern(2): or\\.
 * check-output-excludes: and\\.
 */