diff options
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index a686045..900c33b5 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -2355,7 +2355,7 @@ static bool despeculateCountZeros(IntrinsicInst *CountZeros, // Create a PHI in the end block to select either the output of the intrinsic // or the bit width of the operand. - Builder.SetInsertPoint(EndBlock->begin()); + Builder.SetInsertPoint(EndBlock, EndBlock->begin()); PHINode *PN = Builder.CreatePHI(Ty, 2, "ctz"); replaceAllUsesWith(CountZeros, PN, FreshBBs, IsHugeFunc); Value *BitWidth = Builder.getInt(APInt(SizeInBits, SizeInBits)); @@ -6306,7 +6306,7 @@ bool CodeGenPrepare::splitLargeGEPOffsets() { NewBaseInsertBB = &BaseGEP->getFunction()->getEntryBlock(); NewBaseInsertPt = NewBaseInsertBB->getFirstInsertionPt(); } - IRBuilder<> NewBaseBuilder(NewBaseInsertPt); + IRBuilder<> NewBaseBuilder(NewBaseInsertBB, NewBaseInsertPt); // Create a new base. Value *BaseIndex = ConstantInt::get(PtrIdxTy, BaseOffset); NewBaseGEP = OldBase; |