aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/mem2reg/if-direct.c
diff options
Diffstat (limited to 'validation/mem2reg/if-direct.c')
-rw-r--r--validation/mem2reg/if-direct.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/validation/mem2reg/if-direct.c b/validation/mem2reg/if-direct.c
new file mode 100644
index 00000000..1b5a07cc
--- /dev/null
+++ b/validation/mem2reg/if-direct.c
@@ -0,0 +1,19 @@
+int foo(int c, int a, int b)
+{
+ int l;
+
+ if (c)
+ l = a;
+ else
+ l = b;
+
+ return l;
+}
+
+/*
+ * check-name: if-then-else direct
+ * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
+ * check-output-ignore
+ * check-output-excludes: load\\.
+ * check-output-contains: phi\\.
+ */