summaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyCFG/invoke.ll
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-07-16 22:49:40 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-07-16 22:49:40 +0000
commitd49981a9bbeb49626389119ebec3b0626337b233 (patch)
tree913385fb6f617d793a233261b1467edccc98d9b8 /test/Transforms/SimplifyCFG/invoke.ll
parent7e733eab2f11fceb24d6b4f25c27d7ba7d92d97e (diff)
downloadexternal_llvm-d49981a9bbeb49626389119ebec3b0626337b233.zip
external_llvm-d49981a9bbeb49626389119ebec3b0626337b233.tar.gz
external_llvm-d49981a9bbeb49626389119ebec3b0626337b233.tar.bz2
fix PR13339 (remove the predecessor from the unwind BB when removing an invoke)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160325 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyCFG/invoke.ll')
-rw-r--r--test/Transforms/SimplifyCFG/invoke.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/invoke.ll b/test/Transforms/SimplifyCFG/invoke.ll
index ddced6b..10dc41b 100644
--- a/test/Transforms/SimplifyCFG/invoke.ll
+++ b/test/Transforms/SimplifyCFG/invoke.ll
@@ -3,6 +3,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
declare i32 @__gxx_personality_v0(...)
declare void @__cxa_call_unexpected(i8*)
+declare void @purefn() nounwind readnone
declare i32 @read_only() nounwind readonly
declare i32 @nounwind_fn() nounwind
declare i32 @fn()
@@ -115,3 +116,24 @@ lpad:
tail call void @__cxa_call_unexpected(i8* %phi2) noreturn nounwind
unreachable
}
+
+; CHECK: @f6
+define void @f6() {
+entry:
+ invoke void @purefn()
+ to label %invoke.cont1 unwind label %lpad
+
+invoke.cont1:
+ %foo = invoke i32 @fn()
+ to label %invoke.cont2 unwind label %lpad
+
+invoke.cont2:
+ ret void
+
+lpad:
+; CHECK-NOT: phi
+ %tmp = phi i8* [ null, %invoke.cont1 ], [ null, %entry ]
+ landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ cleanup
+ ret void
+}