• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download

add(int a,int b)1 static int add(int a, int b) { return (a + b) == (b + a); }
mul(int a,int b)2 static int mul(int a, int b) { return (a * b) == (b * a); }
and(int a,int b)3 static int and(int a, int b) { return (a & b) == (b & a); }
ior(int a,int b)4 static int ior(int a, int b) { return (a | b) == (b | a); }
xor(int a,int b)5 static int xor(int a, int b) { return (a ^ b) == (b ^ a); }
eq(int a,int b)6 static int  eq(int a, int b) { return (a == b) == (b == a); }
ne(int a,int b)7 static int  ne(int a, int b) { return (a != b) == (b != a); }
8 
9 
10 /*
11  * check-name: cse-commutativity
12  * check-command: test-linearize $file
13  * check-output-ignore
14  *
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\\.
22  */
23