summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/swifterror.ll
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2016-09-21 16:53:36 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2016-09-21 16:53:36 +0000
commitde2490d0dcff0dd4358456d94f88bdf99859fb5c (patch)
tree18fcc282a44fb6a3bd01c8b6003322ac305935e9 /llvm/test/CodeGen/ARM/swifterror.ll
parent15869f86d84927ceb965eb5eaecabf523d8c7eb9 (diff)
downloadbcm5719-llvm-de2490d0dcff0dd4358456d94f88bdf99859fb5c.tar.gz
bcm5719-llvm-de2490d0dcff0dd4358456d94f88bdf99859fb5c.zip
Disable tail calls if there is an swifterror argument
ISel does not handle them correctly yet i.e we crash trying to emit tail call code. radar://28407842 llvm-svn: 282088
Diffstat (limited to 'llvm/test/CodeGen/ARM/swifterror.ll')
-rw-r--r--llvm/test/CodeGen/ARM/swifterror.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/swifterror.ll b/llvm/test/CodeGen/ARM/swifterror.ll
index 17bd7059f6d..29cd2ffc281 100644
--- a/llvm/test/CodeGen/ARM/swifterror.ll
+++ b/llvm/test/CodeGen/ARM/swifterror.ll
@@ -379,3 +379,15 @@ handler:
call void @free(i8* %tmp)
ret float 1.0
}
+
+; Check that we don't blow up on tail calling swifterror argument functions.
+define float @tailcallswifterror(%swift_error** swifterror %error_ptr_ref) {
+entry:
+ %0 = tail call float @tailcallswifterror(%swift_error** swifterror %error_ptr_ref)
+ ret float %0
+}
+define swiftcc float @tailcallswifterror_swiftcc(%swift_error** swifterror %error_ptr_ref) {
+entry:
+ %0 = tail call swiftcc float @tailcallswifterror_swiftcc(%swift_error** swifterror %error_ptr_ref)
+ ret float %0
+}
OpenPOWER on IntegriCloud