aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/cmp-zext-uimm1.c
diff options
Diffstat (limited to 'validation/optim/cmp-zext-uimm1.c')
-rw-r--r--validation/optim/cmp-zext-uimm1.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/validation/optim/cmp-zext-uimm1.c b/validation/optim/cmp-zext-uimm1.c
new file mode 100644
index 00000000..c21780ea
--- /dev/null
+++ b/validation/optim/cmp-zext-uimm1.c
@@ -0,0 +1,15 @@
+#define zext(X) ((unsigned long long) (X))
+#define BITS ((1ULL << 32) - 1)
+
+int zext_lt_p(unsigned int x) { return (zext(x) < (BITS + 1)) == 1; }
+int zext_le_p(unsigned int x) { return (zext(x) <= (BITS )) == 1; }
+int zext_ge_p(unsigned int x) { return (zext(x) >= (BITS + 1)) == 0; }
+int zext_gt_p(unsigned int x) { return (zext(x) > (BITS )) == 0; }
+
+/*
+ * check-name: cmp-zext-uimm1
+ * check-command: test-linearize -Wno-decl $file
+ *
+ * check-output-ignore
+ * check-output-returns: 1
+ */