aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/mem2reg
diff options
Diffstat (limited to 'validation/mem2reg')
-rw-r--r--validation/mem2reg/quadra01.c27
-rw-r--r--validation/mem2reg/quadra02.c18
2 files changed, 45 insertions, 0 deletions
diff --git a/validation/mem2reg/quadra01.c b/validation/mem2reg/quadra01.c
new file mode 100644
index 00000000..b71f4696
--- /dev/null
+++ b/validation/mem2reg/quadra01.c
@@ -0,0 +1,27 @@
+#include "repeat.h"
+
+void use(void *, void *, void *, void *);
+void *def(void);
+
+#define BLOCK(n) { \
+ void *label; \
+ use(&&w##n, &&x##n, &&y##n, &&z##n); \
+w##n: label = def(); goto *label; \
+x##n: label = def(); goto *label; \
+y##n: label = def(); goto *label; \
+z##n: label = def(); goto *label; \
+}
+
+static void foo(void) {
+ REPEAT2(5, BLOCK)
+}
+
+/*
+ * check-name: quadratic @ liveness
+ * check-command: test-linearize -I. $file
+ * check-timeout:
+ *
+ * check-output-ignore
+ * check-output-excludes: phi\\.
+ * check-output-excludes: phisrc\\.
+ */
diff --git a/validation/mem2reg/quadra02.c b/validation/mem2reg/quadra02.c
new file mode 100644
index 00000000..6475c780
--- /dev/null
+++ b/validation/mem2reg/quadra02.c
@@ -0,0 +1,18 @@
+#include "repeat.h"
+
+#define PAT(X) int a##X = X;
+static void foo(void)
+{
+ REPEAT2(12, PAT)
+}
+
+/*
+ * check-name: quadratic vars
+ * check-command: test-linearize -I. $file
+ * check-timeout:
+ *
+ * check-output-ignore
+ * check-output-excludes: phi\\.
+ * check-output-excludes: phisrc\\.
+ * check-output-excludes: store\\.
+ */