summaryrefslogtreecommitdiff
path: root/test/Transforms/SimplifyCFG
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-08-16 04:23:49 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-08-16 04:23:49 +0000
commit12bb766ae9458b631e9acd97443345966788b5de (patch)
tree442c651740fa82b0b7666e8ab8ee0947b3667ffc /test/Transforms/SimplifyCFG
parent30c74a24290e7595dee4bb783b7f3e78595ae8c3 (diff)
downloadllvm-12bb766ae9458b631e9acd97443345966788b5de.tar.gz
llvm-12bb766ae9458b631e9acd97443345966788b5de.tar.bz2
llvm-12bb766ae9458b631e9acd97443345966788b5de.tar.xz
Fix for PR3016: detect the tricky case, where there are
unfoldable references to a PHI node in the block being folded, and disable the transformation in that case. The correct transformation of such PHI nodes depends on whether BB dominates Succ, and dominance is expensive to compute here. (Alternatively, it's possible to check whether any uses are live, but that's also essentially a dominance calculation. Another alternative is to use reg2mem, but it probably isn't a good idea to use that in simplifycfg.) Also, remove some incorrect code from CanPropagatePredecessorsForPHIs which is made unnecessary with this patch: it didn't consider the case where a PHI node in BB has multiple uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79174 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyCFG')
-rw-r--r--test/Transforms/SimplifyCFG/2009-01-18-PHIPropCrash.ll1
1 files changed, 0 insertions, 1 deletions
diff --git a/test/Transforms/SimplifyCFG/2009-01-18-PHIPropCrash.ll b/test/Transforms/SimplifyCFG/2009-01-18-PHIPropCrash.ll
index fc34f5157b..692ef74826 100644
--- a/test/Transforms/SimplifyCFG/2009-01-18-PHIPropCrash.ll
+++ b/test/Transforms/SimplifyCFG/2009-01-18-PHIPropCrash.ll
@@ -1,5 +1,4 @@
; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis
-; XFAIL: *
; PR3016
; Dead use caused invariant violation.