aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/cmp-and-pow2.c
diff options
context:
space:
mode:
Diffstat (limited to 'validation/optim/cmp-and-pow2.c')
-rw-r--r--validation/optim/cmp-and-pow2.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/validation/optim/cmp-and-pow2.c b/validation/optim/cmp-and-pow2.c
new file mode 100644
index 00000000..01ba2537
--- /dev/null
+++ b/validation/optim/cmp-and-pow2.c
@@ -0,0 +1,12 @@
+#define M 32
+
+_Bool eq(int a) { return ((a & M) != M) == ((a & M) == 0); }
+_Bool ne(int a) { return ((a & M) == M) == ((a & M) != 0); }
+
+/*
+ * check-name: cmp-and-pow2
+ * check-command: test-linearize -Wno-decl $file
+ *
+ * check-output-ignore
+ * check-output-returns: 1
+ */