diff options
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index cee27ff5913..c66f423a292 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -2017,13 +2017,13 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {          // Everything uses the new instruction now.          I->replaceAllUsesWith(Result); +        // Move the name to the new instruction first. +        Result->takeName(I); +          // Push the new instruction and any users onto the worklist.          Worklist.Add(Result);          Worklist.AddUsersToWorkList(*Result); -        // Move the name to the new instruction first. -        Result->takeName(I); -          // Insert the new instruction into the basic block...          BasicBlock *InstParent = I->getParent();          BasicBlock::iterator InsertPos = I; | 

