Skip to content

Commit

Permalink
simplify some code and resolve a fixme.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100272 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed Apr 3, 2010
1 parent c4f7e80 commit fa405af
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/Transforms/Scalar/IndVarSimplify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -745,10 +745,8 @@ void IndVarSimplify::HandleFloatingPointIV(Loop *L, PHINode *PH) {
// original PHI.
ConstantInt *NewEV = ConstantInt::get(Int32Ty, ExitValue);

// FIXME: This is probably wrong.
Value *LHS = NewPHI->getIncomingValue(1);
Value *RHS = NewEV;
ICmpInst *NewCompare = new ICmpInst(TheBr, NewPred, LHS, RHS, EC->getName());
ICmpInst *NewCompare = new ICmpInst(TheBr, NewPred, NewAdd, NewEV,
EC->getName());

// In the following deletions, PH may become dead and may be deleted.
// Use a WeakVH to observe whether this happens.
Expand Down

0 comments on commit fa405af

Please sign in to comment.