db/insert_manual_states.pl: remove debug output
[smatch.git] / validation / optim / shl-and1.c
blob13a1675bedd6a0dc2c10f8637273df1aa60c199c
1 // If (t << S) is simplified into (x << S)
2 // then the whole expression will be 0.
3 // The test is only interesting if the sub-expression
4 // (x & M) is referenced more than once
5 // (because otherwise other simplifications apply).
6 unsigned shl_and1(unsigned x)
8 unsigned t = (x & 0x000fffff);
9 return ((t << 12) ^ (x << 12)) & t;
13 * check-name: shl-and1
14 * check-command: test-linearize -Wno-decl $file
16 * check-output-ignore
17 * check-output-contains: ret\\..*\\$0$