aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/cse-not01.c
diff options
Diffstat (limited to 'validation/optim/cse-not01.c')
-rw-r--r--validation/optim/cse-not01.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/validation/optim/cse-not01.c b/validation/optim/cse-not01.c
new file mode 100644
index 00000000..ea1bb7cf
--- /dev/null
+++ b/validation/optim/cse-not01.c
@@ -0,0 +1,11 @@
+int and(int a) { return (~a & a) == 0; }
+int ior(int a) { return (~a | a) == ~0; }
+int xor(int a) { return (~a ^ a) == ~0; }
+
+/*
+ * check-name: cse-not01
+ * check-command: test-linearize -Wno-decl $file
+ *
+ * check-output-ignore
+ * check-output-returns: 1
+ */