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 feefe87..36f6cc8 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -4130,7 +4130,7 @@ private: PHINode *CurrentPhi = cast<PHINode>(Current); unsigned PredCount = CurrentPhi->getNumIncomingValues(); PHINode *PHI = - PHINode::Create(CommonType, PredCount, "sunk_phi", CurrentPhi); + PHINode::Create(CommonType, PredCount, "sunk_phi", CurrentPhi->getIterator()); Map[Current] = PHI; ST.insertNewPhi(PHI); append_range(Worklist, CurrentPhi->incoming_values()); @@ -6436,7 +6436,7 @@ bool CodeGenPrepare::optimizePhiType( } for (PHINode *Phi : PhiNodes) ValMap[Phi] = PHINode::Create(ConvertTy, Phi->getNumIncomingValues(), - Phi->getName() + ".tc", Phi); + Phi->getName() + ".tc", Phi->getIterator()); // Pipe together all the PhiNodes. for (PHINode *Phi : PhiNodes) { PHINode *NewPhi = cast<PHINode>(ValMap[Phi]); |