summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2017-01-31 17:53:49 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2017-01-31 17:53:49 +0000
commitc368563bd679fd74dd19723f78352b4f5b5c4164 (patch)
tree35358906ac462ba9fb269d789e270d616bd0501a /llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
parent274df5ea4135e4bab5ce1f59282ce21a4d255750 (diff)
downloadbcm5719-llvm-c368563bd679fd74dd19723f78352b4f5b5c4164.tar.gz
bcm5719-llvm-c368563bd679fd74dd19723f78352b4f5b5c4164.zip
Don't combine stores to a swifterror pointer operand to a different type
llvm-svn: 293658
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
index 5fe9e5c645a..6ceca78d455 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
@@ -502,7 +502,8 @@ static Instruction *combineLoadToOperationType(InstCombiner &IC, LoadInst &LI) {
!DL.isNonIntegralPointerType(Ty)) {
if (all_of(LI.users(), [&LI](User *U) {
auto *SI = dyn_cast<StoreInst>(U);
- return SI && SI->getPointerOperand() != &LI;
+ return SI && SI->getPointerOperand() != &LI &&
+ !SI->getPointerOperand()->isSwiftError();
})) {
LoadInst *NewLoad = combineLoadToNewType(
IC, LI,
OpenPOWER on IntegriCloud