summaryrefslogtreecommitdiff
path: root/test/Transforms/SimplifyCFG
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-10-24 12:23:30 +0000
committerDuncan Sands <baldrick@free.fr>2010-10-24 12:23:30 +0000
commit5f28475b30cf09e946bf6cb7c8de6d597a41610e (patch)
tree0f56958d9b7aada7cb44ded00547823c403fc43a /test/Transforms/SimplifyCFG
parentc052a8c772b1d55e5ed1a34f1750dac20c66c641 (diff)
downloadllvm-5f28475b30cf09e946bf6cb7c8de6d597a41610e.tar.gz
llvm-5f28475b30cf09e946bf6cb7c8de6d597a41610e.tar.bz2
llvm-5f28475b30cf09e946bf6cb7c8de6d597a41610e.tar.xz
Fix PR8445: a block with no predecessors may be the entry block, in which case
it isn't unreachable and should not be zapped. The check for the entry block was missing in one case: a block containing a unwind instruction. While there, do some small cleanups: "M" is not a great name for a Function* (it would be more appropriate for a Module*), change it to "Fn"; use Fn in more places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyCFG')
-rw-r--r--test/Transforms/SimplifyCFG/2010-10-24-OnlyUnwindInEntry.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/2010-10-24-OnlyUnwindInEntry.ll b/test/Transforms/SimplifyCFG/2010-10-24-OnlyUnwindInEntry.ll
new file mode 100644
index 0000000000..ebacf2fe9a
--- /dev/null
+++ b/test/Transforms/SimplifyCFG/2010-10-24-OnlyUnwindInEntry.ll
@@ -0,0 +1,6 @@
+; RUN: opt %s -simplifycfg -disable-output
+; PR8445
+
+define void @test() {
+ unwind
+}