summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll
diff options
context:
space:
mode:
authorDavid Callahan <dcallahan@fb.com>2016-12-13 16:42:18 +0000
committerDavid Callahan <dcallahan@fb.com>2016-12-13 16:42:18 +0000
commitebcf916c5aefb82814efeaf6582e31ee149c00f5 (patch)
tree0e817ba63686fbb6513d486721d3f5515f6d7a9b /llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll
parent1647f3855fe517a47704d399a30984004e759e89 (diff)
downloadbcm5719-llvm-ebcf916c5aefb82814efeaf6582e31ee149c00f5.tar.gz
bcm5719-llvm-ebcf916c5aefb82814efeaf6582e31ee149c00f5.zip
[ADCE] Add code to remove dead branches
Summary: This is last in of a series of patches to evolve ADCE.cpp to support removing of unnecessary control flow. This patch adds the code to update the control and data flow graphs to remove the dead control flow. Also update unit tests to test the capability to remove dead, may-be-infinite loop which is enabled by the switch -adce-remove-loops. Previous patches: D23824 [ADCE] Add handling of PHI nodes when removing control flow D23559 [ADCE] Add control dependence computation D23225 [ADCE] Modify data structures to support removing control flow D23065 [ADCE] Refactor anticipating new functionality (NFC) D23102 [ADCE] Refactoring for new functionality (NFC) Reviewers: dberlin, majnemer, nadav, mehdi_amini Subscribers: llvm-commits, david2050, freik, twoh Differential Revision: https://reviews.llvm.org/D24918 llvm-svn: 289548
Diffstat (limited to 'llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll')
-rw-r--r--llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll b/llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll
index d30df19fc7c..37adba599cd 100644
--- a/llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll
+++ b/llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll
@@ -2,7 +2,8 @@
; entries for it's postdominator. But I think this can only happen when the
; PHI node is dead, so we just avoid patching up dead PHI nodes.
-; RUN: opt < %s -adce
+; RUN: opt < %s -adce -S | FileCheck %s
+; RUN: opt < %s -adce -adce-remove-loops -S | FileCheck %s
target datalayout = "e-p:32:32"
@@ -15,6 +16,7 @@ loopentry: ; preds = %endif, %entry
br i1 false, label %no_exit, label %return
no_exit: ; preds = %loopentry
+; CHECK: br label %then
br i1 false, label %then, label %else
then: ; preds = %no_exit
OpenPOWER on IntegriCloud