aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-02-10 11:59:59 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-02-10 14:24:51 +0100
commit71205271e3c082b66a21640b2e92f21f5eaa7ad0 (patch)
tree8430276c307d75a49810921da553e2fcf594cc7d /validation
parentdd566d02ba1168b22281fb00b312fe09e6f09813 (diff)
downloadsparse-dev-71205271e3c082b66a21640b2e92f21f5eaa7ad0.tar.gz
fix dead dominator
During simplify_one_symbol(), if possible, loads are replaced by an OP_PHI and the corresponding OP_PHISOURCE. To simplify things firther, If all the phisrcs correspond to an unique pseudo (often because there is only a single phisrc), then it's useless to create the OP_PHI: the created OP_PHISOURCEs can be removed and the initial load can be converted to the unique pseudo. However, if the unique pseudo was never used, the removal of the OP_PHISOURCEs, done *before* the load conversion, will kill the defining load (at this point the only user of the pseudo was the OP_PHISOURCEs) which will then erroneously make a VOID from the pseudo. Fix this by doing the load conversion before removing the unneeded OP_PHISOURCEs.
Diffstat (limited to 'validation')
-rw-r--r--validation/mem2reg/load-dead.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/mem2reg/load-dead.c b/validation/mem2reg/load-dead.c
index 19ac4e5e..1165fa1e 100644
--- a/validation/mem2reg/load-dead.c
+++ b/validation/mem2reg/load-dead.c
@@ -12,7 +12,6 @@ static void foo(int a)
/*
* check-name: load-dead
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-excludes: VOID