1f08c3bdfSopenharmony_cistatic void ok(int x)
2f08c3bdfSopenharmony_ci{
3f08c3bdfSopenharmony_ci	__assert((~x) == (~0 - x));	// true but not simplified yet
4f08c3bdfSopenharmony_ci	__assert_eq(~x, ~0 - x);
5f08c3bdfSopenharmony_ci	__assert_const(x & 0, 0);
6f08c3bdfSopenharmony_ci}
7f08c3bdfSopenharmony_ci
8f08c3bdfSopenharmony_cistatic void always(int x)
9f08c3bdfSopenharmony_ci{
10f08c3bdfSopenharmony_ci	__assert((x - x) == 0);		// true and simplified
11f08c3bdfSopenharmony_ci}
12f08c3bdfSopenharmony_ci
13f08c3bdfSopenharmony_cistatic void assumed(int x, int a, int b)
14f08c3bdfSopenharmony_ci{
15f08c3bdfSopenharmony_ci	__assume((a & ~b) == 0);
16f08c3bdfSopenharmony_ci	__assert_eq((x ^ a) | b, x | b);
17f08c3bdfSopenharmony_ci}
18f08c3bdfSopenharmony_ci
19f08c3bdfSopenharmony_ci/*
20f08c3bdfSopenharmony_ci * check-name: scheck-ok
21f08c3bdfSopenharmony_ci * check-command: scheck $file
22f08c3bdfSopenharmony_ci */
23