aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rw-r--r--validation/optim/bool-sext-test.c13
-rw-r--r--validation/optim/bool-zext-test.c13
2 files changed, 26 insertions, 0 deletions
diff --git a/validation/optim/bool-sext-test.c b/validation/optim/bool-sext-test.c
new file mode 100644
index 00000000..0ca3dea9
--- /dev/null
+++ b/validation/optim/bool-sext-test.c
@@ -0,0 +1,13 @@
+_Bool eqs0( signed char a) { return a == 0; }
+_Bool eqs1( signed char a) { return a == 1; }
+_Bool nes0( signed char a) { return a != 0; }
+_Bool nes1( signed char a) { return a != 1; }
+
+/*
+ * check-name: bool-sext-test
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-excludes: sext\\.
+ */
diff --git a/validation/optim/bool-zext-test.c b/validation/optim/bool-zext-test.c
new file mode 100644
index 00000000..f837ace2
--- /dev/null
+++ b/validation/optim/bool-zext-test.c
@@ -0,0 +1,13 @@
+_Bool equ0(unsigned char a) { return a == 0; }
+_Bool equ1(unsigned char a) { return a == 1; }
+_Bool neu0(unsigned char a) { return a != 0; }
+_Bool neu1(unsigned char a) { return a != 1; }
+
+/*
+ * check-name: bool-zext-test
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-excludes: zext\\.
+ */