xref: /illumos-gate/usr/src/tools/smatch/src/validation/optim/mask-lsr.c (revision 2a8bcb4efb45d99ac41c94a75c396b362c414f7f)
1 // ((x & M) | y) >> S to (y >> S) when (M >> S) == 0
2 
3 unsigned int foo(unsigned int x, unsigned int y)
4 {
5 	return ((x & 0xff) | y) >> 8;
6 }
7 
8 /*
9  * check-name: mask-lsr
10  * check-command: test-linearize -Wno-decl $file
11  *
12  * check-output-ignore
13  * check-output-excludes: %arg1
14  */
15