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

unsigned shl_or_and0(unsigned x, unsigned b)
{
	return (((x & 0xfff00000) | b) << 12);
}

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