summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/crash.ll
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-11-29 19:38:06 +0000
committerBill Wendling <isanbard@gmail.com>2012-11-29 19:38:06 +0000
commita4a77edf2e27dc8a24ac3323c48a2c7201fccbda (patch)
tree40178446d5976def3a618b7b722eedeb4f64b2fc /llvm/test/CodeGen/ARM/crash.ll
parente95559fc16277e561cdb62fe36ea9de66afde329 (diff)
downloadbcm5719-llvm-a4a77edf2e27dc8a24ac3323c48a2c7201fccbda.tar.gz
bcm5719-llvm-a4a77edf2e27dc8a24ac3323c48a2c7201fccbda.zip
Handle the situation where CodeGenPrepare removes a reference to a BB that has
the last invoke instruction in the function. This also removes the last landing pad in an function. This is fine, but with SjLj EH code, we've already placed a bunch of code in the 'entry' block, which expects the landing pad to stick around. When we get to the situation where CGP has removed the last landing pad, go ahead and nuke the SjLj instructions from the 'entry' block. <rdar://problem/12721258> llvm-svn: 168930
Diffstat (limited to 'llvm/test/CodeGen/ARM/crash.ll')
-rw-r--r--llvm/test/CodeGen/ARM/crash.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/crash.ll b/llvm/test/CodeGen/ARM/crash.ll
index 0f6f33e0448..4e3e2010b07 100644
--- a/llvm/test/CodeGen/ARM/crash.ll
+++ b/llvm/test/CodeGen/ARM/crash.ll
@@ -69,3 +69,26 @@ bb:
store <4 x float> %tmp154, <4 x float>* undef, align 16
ret void
}
+
+; <rdar://problem/12721258>
+%A = type { %B }
+%B = type { i32 }
+
+define void @_Z3Foov() ssp {
+entry:
+ br i1 true, label %exit, label %false
+
+false:
+ invoke void undef(%A* undef)
+ to label %exit unwind label %lpad
+
+lpad:
+ %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
+ catch i8* null
+ unreachable
+
+exit:
+ ret void
+}
+
+declare i32 @__gxx_personality_sj0(...)
OpenPOWER on IntegriCloud