db/fixup_kernel.sh: fix clear_user() handling
[smatch.git] / validation / optim / canonical-mul.c
blob0c14226faaaffa731617285679673fb956f1f1de
1 #define uint unsigned int
3 uint xtc_umul_ytc(uint x, uint y) { return (x * 3) * (y * 2); }
5 /*
6 * check-name: canonical-muldiv
7 * check-description:
8 * 1) verify that constants in mul chains are
9 * pushed at the right of the whole chain.
10 * For example '(a * 3) * b' must be canonicalized into '(a * b) * 3'
11 * This is needed in general for constant simplification;
12 * for example, for:
13 * '(a * 3) * (b * 2)'
14 * to be simplified into:
15 * '(a * b) * 6'
17 * check-command: test-linearize -Wno-decl $file
18 * check-known-to-fail
19 * check-output-ignore
21 * check-output-excludes: \\$3
22 * check-output-excludes: \\$2
23 * check-output-contains: \\$6