summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2017-03-07 20:29:02 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2017-03-07 20:29:02 +0000
commit69e74b48f2f2afee9186f4dcda0ab84167f381a4 (patch)
tree0124f6cbd1da19e6b4b0a9a7b2f039ca27988d26 /llvm/test/CodeGen/ARM
parenta8f5a8298c0008097e5f038bfd9baac23a528787 (diff)
downloadbcm5719-llvm-69e74b48f2f2afee9186f4dcda0ab84167f381a4.tar.gz
bcm5719-llvm-69e74b48f2f2afee9186f4dcda0ab84167f381a4.zip
SjLjEHPrepare: Fix the pass for swifterror arguments
We cannot leave the identity copies 'select true, arg, undef' that this pass inserts for arguments to simplify handling of values on swifterror arguments. swifterror arguments have restrictions on their uses. rdar://30839288 llvm-svn: 297197
Diffstat (limited to 'llvm/test/CodeGen/ARM')
-rw-r--r--llvm/test/CodeGen/ARM/sjljeh-swifterror.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/sjljeh-swifterror.ll b/llvm/test/CodeGen/ARM/sjljeh-swifterror.ll
new file mode 100644
index 00000000000..aae0e75c98a
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/sjljeh-swifterror.ll
@@ -0,0 +1,27 @@
+; RUN: opt -sjljehprepare -verify < %s | FileCheck %s
+target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
+target triple = "armv7s-apple-ios7.0"
+
+%swift.error = type opaque
+
+declare void @objc_msgSend() local_unnamed_addr
+
+declare i32 @__objc_personality_v0(...)
+
+; Make sure we don't leave a select on a swifterror argument.
+; CHECK-LABEL; @test
+; CHECK-NOT: select true, %0
+define swiftcc void @test(%swift.error** swifterror) local_unnamed_addr personality i32 (...)* @__objc_personality_v0 {
+entry:
+ %call28.i = invoke i32 bitcast (void ()* @objc_msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
+ to label %invoke.cont.i unwind label %lpad.i
+
+invoke.cont.i:
+ unreachable
+
+lpad.i:
+ %1 = landingpad { i8*, i32 }
+ cleanup
+ resume { i8*, i32 } undef
+}
+
OpenPOWER on IntegriCloud