(Almost) always call reserveOperandSpace() on newly created PHINodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128535 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp
index b545f0b..cb3875e 100644
--- a/lib/Transforms/IPO/LowerSetJmp.cpp
+++ b/lib/Transforms/IPO/LowerSetJmp.cpp
@@ -432,6 +432,7 @@
// splitBasicBlock call.
PHINode* PHI = PHINode::Create(Type::getInt32Ty(Inst->getContext()),
"SetJmpReturn", Inst);
+ PHI->reserveOperandSpace(2);
// Coming from a call to setjmp, the return is 0.
PHI->addIncoming(Constant::getNullValue(Type::getInt32Ty(Inst->getContext())),