aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/cse-commutativity.c
blob: 826034781cb400d38a3436d5685b2b3853f03d9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
static int add(int a, int b) { return (a + b) == (b + a); }
static int mul(int a, int b) { return (a * b) == (b * a); }
static int and(int a, int b) { return (a & b) == (b & a); }
static int ior(int a, int b) { return (a | b) == (b | a); }
static int xor(int a, int b) { return (a ^ b) == (b ^ a); }
static int  eq(int a, int b) { return (a == b) == (b == a); }
static int  ne(int a, int b) { return (a != b) == (b != a); }


/*
 * check-name: cse-commutativity
 * check-command: test-linearize $file
 * check-output-ignore
 *
 * check-output-excludes: add\\.
 * check-output-excludes: muls\\.
 * check-output-excludes: and\\.
 * check-output-excludes: or\\.
 * check-output-excludes: xor\\.
 * check-output-excludes: seteq\\.
 * check-output-excludes: setne\\.
 */