db/fixup_kernel.sh: fix clear_user() handling
[smatch.git] / validation / optim / cse-commutativity.c
blob826034781cb400d38a3436d5685b2b3853f03d9e
1 static int add(int a, int b) { return (a + b) == (b + a); }
2 static int mul(int a, int b) { return (a * b) == (b * a); }
3 static int and(int a, int b) { return (a & b) == (b & a); }
4 static int ior(int a, int b) { return (a | b) == (b | a); }
5 static int xor(int a, int b) { return (a ^ b) == (b ^ a); }
6 static int eq(int a, int b) { return (a == b) == (b == a); }
7 static int ne(int a, int b) { return (a != b) == (b != a); }
11 * check-name: cse-commutativity
12 * check-command: test-linearize $file
13 * check-output-ignore
15 * check-output-excludes: add\\.
16 * check-output-excludes: muls\\.
17 * check-output-excludes: and\\.
18 * check-output-excludes: or\\.
19 * check-output-excludes: xor\\.
20 * check-output-excludes: seteq\\.
21 * check-output-excludes: setne\\.