[llvm-commits] [llvm] r41280 - /llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
Devang Patel
dpatel at apple.com
Wed Aug 22 11:07:47 PDT 2007
Author: dpatel
Date: Wed Aug 22 13:07:47 2007
New Revision: 41280
URL: http://llvm.org/viewvc/llvm-project?rev=41280&view=rev
Log:
Fix thinko.
Starting value of second loop's induction variable can not be lower
then starting value of original loop's induction variable.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp?rev=41280&r1=41279&r2=41280&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp Wed Aug 22 13:07:47 2007
@@ -748,7 +748,7 @@
//[*] Calculate True loop's new Exit Value in loop preheader.
// TL_ExitValue = min(SplitValue, ExitValue)
//[*] Calculate False loop's new Start Value in loop preheader.
- // FL_StartValue = min(SplitValue, TrueLoop.StartValue)
+ // FL_StartValue = max(SplitValue, TrueLoop.StartValue)
Value *TL_ExitValue = NULL;
Value *FL_StartValue = NULL;
if (isa<ConstantInt>(SD.SplitValue)) {
@@ -770,8 +770,8 @@
ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT,
SD.SplitValue, StartValue, "lsplit.sv",
TL_PHTerminator);
- FL_StartValue = new SelectInst(C2, SD.SplitValue, StartValue,
- "lsplit.sv", TL_Preheader->getTerminator());
+ FL_StartValue = new SelectInst(C2, StartValue, SD.SplitValue,
+ "lsplit.sv", TL_PHTerminator);
}
//[*] Clone loop. Avoid true destination of split condition and
More information about the llvm-commits
mailing list