summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-02-03 04:34:40 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-02-03 04:34:40 +0000
commitdac5c4b10b387b55c2394cd98a64f3f1394df2e8 (patch)
treeff9e30cb68f18ffd4e6a5061fd8c1b64da01a298 /test
parentd62e06c53b8b7e555617dc9b24b98c007d63de5d (diff)
downloadexternal_llvm-dac5c4b10b387b55c2394cd98a64f3f1394df2e8.zip
external_llvm-dac5c4b10b387b55c2394cd98a64f3f1394df2e8.tar.gz
external_llvm-dac5c4b10b387b55c2394cd98a64f3f1394df2e8.tar.bz2
Update the callgraph when replacing InvokeInst with CallInst when inlining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/Inline/2009-02-02-InvokeUpdateCG.ll32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/Transforms/Inline/2009-02-02-InvokeUpdateCG.ll b/test/Transforms/Inline/2009-02-02-InvokeUpdateCG.ll
new file mode 100644
index 0000000..38d7596
--- /dev/null
+++ b/test/Transforms/Inline/2009-02-02-InvokeUpdateCG.ll
@@ -0,0 +1,32 @@
+; RUN: llvm-as < %s | opt -inline -prune-eh
+; PR3367
+
+define void @f2() {
+ invoke void @f6()
+ to label %ok1 unwind label %lpad1
+
+ok1:
+ ret void
+
+lpad1:
+ invoke void @f4()
+ to label %ok2 unwind label %lpad2
+
+ok2:
+ call void @f8()
+ unreachable
+
+lpad2:
+ unreachable
+}
+
+declare void @f3()
+
+define void @f4() {
+ call void @f3()
+ ret void
+}
+
+declare void @f6() nounwind
+
+declare void @f8()