aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-04-29 01:48:15 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-09-01 22:53:30 +0200
commit1b2f4d1229fb2c9d55cbc56be5319c26662c45ca (patch)
treeb6febf6dc84ed2bd403b89ce9bfe34b6d4089a7a /validation
parent2a07333ec7ff676a7aedd58d1eff59469b9b6c1e (diff)
downloadsparse-dev-1b2f4d1229fb2c9d55cbc56be5319c26662c45ca.tar.gz
trivial-phi: add testcase for unneeded trivial phi-nodes
Trivial phi-nodes are phi-nodes having an unique possible outcome. So, there is nothing to join and the phi-node target can be replaced by the unique value. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/optim/trivial-phis.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/validation/optim/trivial-phis.c b/validation/optim/trivial-phis.c
new file mode 100644
index 00000000..754affb7
--- /dev/null
+++ b/validation/optim/trivial-phis.c
@@ -0,0 +1,15 @@
+void foo(int a)
+{
+ while (1)
+ a ^= 0;
+}
+
+/*
+ * check-name: trivial phis
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-excludes: phi\\.
+ * check-output-excludes: phisrc\\.
+ */