summaryrefslogtreecommitdiff
path: root/test/Transforms/LCSSA/unreachable-use.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-03-09 01:53:33 +0000
committerDan Gohman <gohman@apple.com>2010-03-09 01:53:33 +0000
commitcbac7f163099fda6f3c036920404e4b87ab33d2a (patch)
tree5295b5cf0c0f8fefe128d11d63c443076160a70a /test/Transforms/LCSSA/unreachable-use.ll
parent5b9062cb3ad2a60f18e941ac42a2382302c46f24 (diff)
downloadllvm-cbac7f163099fda6f3c036920404e4b87ab33d2a.tar.gz
llvm-cbac7f163099fda6f3c036920404e4b87ab33d2a.tar.bz2
llvm-cbac7f163099fda6f3c036920404e4b87ab33d2a.tar.xz
Make isLCSSA ignore uses in blocks not reachable from the entry block,
as LCSSA no longer transforms such uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/LCSSA/unreachable-use.ll')
-rw-r--r--test/Transforms/LCSSA/unreachable-use.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Transforms/LCSSA/unreachable-use.ll b/test/Transforms/LCSSA/unreachable-use.ll
new file mode 100644
index 0000000000..c389c9cfa8
--- /dev/null
+++ b/test/Transforms/LCSSA/unreachable-use.ll
@@ -0,0 +1,27 @@
+; RUN: opt < %s -lcssa -S -verify-loop-info | grep {\[%\]tmp33 = load i1\\*\\* \[%\]tmp}
+; PR6546
+
+; LCSSA doesn't need to transform uses in blocks not reachable
+; from the entry block.
+
+define fastcc void @dfs() nounwind {
+bb:
+ br label %bb44
+
+bb44:
+ br i1 undef, label %bb7, label %bb45
+
+bb7:
+ %tmp = bitcast i1** undef to i1**
+ br label %bb15
+
+bb15:
+ br label %bb44
+
+bb32:
+ %tmp33 = load i1** %tmp, align 8
+ br label %bb45
+
+bb45:
+ unreachable
+}