xref: /illumos-gate/usr/src/tools/smatch/src/validation/optim/mask-lsr.c (revision f52943a93040563107b95bccb9db87d9971ef47d)
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