summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Inline
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2016-09-09 22:40:27 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2016-09-09 22:40:27 +0000
commitc9277f40fddadc0d6fc727dffdd7dc7742c0aadc (patch)
treeefecf9f001b3cb48e446a48c70fc92ac0aa2d40a /llvm/test/Transforms/Inline
parent6ecf619be99be4181cb677f066159bc05901d720 (diff)
downloadbcm5719-llvm-c9277f40fddadc0d6fc727dffdd7dc7742c0aadc.tar.gz
bcm5719-llvm-c9277f40fddadc0d6fc727dffdd7dc7742c0aadc.zip
Inliner: Don't mark swifterror allocas with lifetime markers
This would create a bitcast use which fails the verifier: swifterror values may only be used by loads, stores, and as function arguments. rdar://28233244 llvm-svn: 281114
Diffstat (limited to 'llvm/test/Transforms/Inline')
-rw-r--r--llvm/test/Transforms/Inline/lifetime.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Inline/lifetime.ll b/llvm/test/Transforms/Inline/lifetime.ll
index 12c433b9e62..fc209ccc50f 100644
--- a/llvm/test/Transforms/Inline/lifetime.ll
+++ b/llvm/test/Transforms/Inline/lifetime.ll
@@ -98,3 +98,20 @@ define void @test_arrays_alloca() {
; CHECK: ret void
ret void
}
+
+%swift.error = type opaque
+
+define void @helper_swifterror_alloca() {
+entry:
+ %swifterror = alloca swifterror %swift.error*, align 8
+ store %swift.error* null, %swift.error** %swifterror, align 8
+ ret void
+}
+
+define void @test_swifterror_alloca() {
+; CHECK-LABEL: @test_swifterror_alloca(
+; CHECK-NOT: lifetime
+ call void @helper_swifterror_alloca()
+; CHECK: ret void
+ ret void
+}
OpenPOWER on IntegriCloud