summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/ADCE/2002-05-28-Crash.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/2002-05-28-Crash.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/2002-05-28-Crash.ll')
-rw-r--r--llvm/test/Transforms/ADCE/2002-05-28-Crash.ll2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/test/Transforms/ADCE/2002-05-28-Crash.ll b/llvm/test/Transforms/ADCE/2002-05-28-Crash.ll
index d88580afad0..3090792a55a 100644
--- a/llvm/test/Transforms/ADCE/2002-05-28-Crash.ll
+++ b/llvm/test/Transforms/ADCE/2002-05-28-Crash.ll
@@ -12,6 +12,7 @@
;}
;
; RUN: opt < %s -adce
+; RUN: opt < %s -adce -adce-remove-loops -S | FileCheck %s
define i32 @rx_bitset_empty(i32 %size, i32* %set) {
bb1:
@@ -28,6 +29,7 @@ bb1:
%reg124 = getelementptr i32, i32* %set, i64 %reg114-idxcast-offset.upgrd.1 ; <i32*> [#uses=1]
%reg125 = load i32, i32* %reg124 ; <i32> [#uses=1]
%cond232 = icmp ne i32 %reg125, 0 ; <i1> [#uses=1]
+; CHECK: br label %bb3
br i1 %cond232, label %bb3, label %bb2
bb2: ; preds = %bb2, %bb1
OpenPOWER on IntegriCloud