aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/cmpu-or0.c
diff options
context:
space:
mode:
Diffstat (limited to 'validation/optim/cmpu-or0.c')
-rw-r--r--validation/optim/cmpu-or0.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/validation/optim/cmpu-or0.c b/validation/optim/cmpu-or0.c
new file mode 100644
index 00000000..e97e9180
--- /dev/null
+++ b/validation/optim/cmpu-or0.c
@@ -0,0 +1,18 @@
+#define EQ(X) + (X == 0)
+#define MASK 32U
+
+
+int cmpu_ior_lt_lt(int a) { return ((a | MASK) < (MASK - 1)) EQ(0); }
+int cmpu_ior_lt_eq(int a) { return ((a | MASK) < (MASK )) EQ(0); }
+int cmpu_ior_le_lt(int a) { return ((a | MASK) <= (MASK - 1)) EQ(0); }
+int cmpu_ior_ge_lt(int a) { return ((a | MASK) >= (MASK - 1)) EQ(1); }
+int cmpu_ior_ge_eq(int a) { return ((a | MASK) >= (MASK )) EQ(1); }
+int cmpu_ior_gt_lt(int a) { return ((a | MASK) > (MASK - 1)) EQ(1); }
+
+/*
+ * check-name: cmpu-or0
+ * check-command: test-linearize -Wno-decl $file
+ *
+ * check-output-ignore
+ * check-output-returns: 1
+ */