aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/set-uimm2.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-25 16:03:38 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-11-05 01:59:06 +0100
commit17c0dc05248364ea9b64aa4d997c49a516208d6d (patch)
tree069feb65896d5cf9e485f3f08376677c1518ff89 /validation/optim/set-uimm2.c
parentee854cb92c46b4194f2014332dc856efa2cf250f (diff)
downloadsparse-dev-17c0dc05248364ea9b64aa4d997c49a516208d6d.tar.gz
cmp: add testcases for the simplification of compares
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim/set-uimm2.c')
-rw-r--r--validation/optim/set-uimm2.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/validation/optim/set-uimm2.c b/validation/optim/set-uimm2.c
new file mode 100644
index 00000000..efa326f5
--- /dev/null
+++ b/validation/optim/set-uimm2.c
@@ -0,0 +1,13 @@
+static _Bool setlt_umax(unsigned int a) { return (a < ~0) == (a != ~0); }
+static _Bool setle_umax(unsigned int a) { return (a <= ~1) == (a != ~0); }
+static _Bool setge_umax(unsigned int a) { return (a >= ~0) == (a == ~0); }
+static _Bool setgt_umax(unsigned int a) { return (a > ~1) == (a == ~0); }
+
+/*
+ * check-name: set-uimm2
+ * check-command: test-linearize $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-returns: 1
+ */