diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-03 06:06:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-03 06:06:59 +0000 |
commit | d77bde5f944669ad9f1ae031ba9c609713977a1c (patch) | |
tree | 66daf91d359cafe512fc9066e97d609085840f80 /llvm/lib/Transforms | |
parent | 2ff33f91d55502dd0540abfd074aaf6180bf6e81 (diff) | |
download | bcm5719-llvm-d77bde5f944669ad9f1ae031ba9c609713977a1c.tar.gz bcm5719-llvm-d77bde5f944669ad9f1ae031ba9c609713977a1c.zip |
simplify some code and resolve a fixme.
llvm-svn: 100272
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index 41b216b9270..c658106d38f 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -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. |