summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
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/lib/Transforms/Utils/InlineFunction.cpp
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/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index e001f6d2863..383010f0f9d 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -1789,6 +1789,9 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI,
IRBuilder<> builder(&FirstNewBlock->front());
for (unsigned ai = 0, ae = IFI.StaticAllocas.size(); ai != ae; ++ai) {
AllocaInst *AI = IFI.StaticAllocas[ai];
+ // Don't mark swifterror allocas. They can't have bitcast uses.
+ if (AI->isSwiftError())
+ continue;
// If the alloca is already scoped to something smaller than the whole
// function then there's no need to add redundant, less accurate markers.
OpenPOWER on IntegriCloud