[llvm-branch-commits] [llvm-branch] r70265 - in /llvm/branches/Apple/Dib: lib/Transforms/Scalar/IndVarSimplify.cpp test/Transforms/IndVarSimplify/2009-04-27-Floating.ll
Bill Wendling
isanbard at gmail.com
Mon Apr 27 15:37:24 PDT 2009
Author: void
Date: Mon Apr 27 17:37:24 2009
New Revision: 70265
URL: http://llvm.org/viewvc/llvm-project?rev=70265&view=rev
Log:
--- Merging r70247 into '.':
A test/Transforms/IndVarSimplify/2009-04-27-Floating.ll
U lib/Transforms/Scalar/IndVarSimplify.cpp
Fix PR 4086, a bug in FP IV elimination.
Added:
llvm/branches/Apple/Dib/test/Transforms/IndVarSimplify/2009-04-27-Floating.ll
- copied unchanged from r70247, llvm/trunk/test/Transforms/IndVarSimplify/2009-04-27-Floating.ll
Modified:
llvm/branches/Apple/Dib/lib/Transforms/Scalar/IndVarSimplify.cpp
Modified: llvm/branches/Apple/Dib/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=70265&r1=70264&r2=70265&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Transforms/Scalar/IndVarSimplify.cpp Mon Apr 27 17:37:24 2009
@@ -1037,9 +1037,11 @@
Incr->getName()+".int", Incr);
NewPHI->addIncoming(NewAdd, PH->getIncomingBlock(BackEdge));
+ // The back edge is edge 1 of newPHI, whatever it may have been in the
+ // original PHI.
ConstantInt *NewEV = ConstantInt::get(Type::Int32Ty, intEV);
- Value *LHS = (EVIndex == 1 ? NewPHI->getIncomingValue(BackEdge) : NewEV);
- Value *RHS = (EVIndex == 1 ? NewEV : NewPHI->getIncomingValue(BackEdge));
+ Value *LHS = (EVIndex == 1 ? NewPHI->getIncomingValue(1) : NewEV);
+ Value *RHS = (EVIndex == 1 ? NewEV : NewPHI->getIncomingValue(1));
ICmpInst *NewEC = new ICmpInst(NewPred, LHS, RHS, EC->getNameStart(),
EC->getParent()->getTerminator());
More information about the llvm-branch-commits
mailing list