diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 670499062ec..f20d424724a 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -842,6 +842,7 @@ void IndVarSimplify::HandleFloatingPointIV(Loop *L, PHINode *PH) { WeakVH WeakPH = PH; // Delete old, floating point, exit comparision instruction. + NewEC->takeName(EC); EC->replaceAllUsesWith(NewEC); RecursivelyDeleteTriviallyDeadInstructions(EC);