[llvm-commits] [llvm] r165187 - in /llvm/trunk: lib/Transforms/Scalar/IndVarSimplify.cpp test/Transforms/IndVarSimplify/crash.ll

Eric Christopher echristo at gmail.com
Thu Oct 4 00:19:03 PDT 2012


>
>    // Do LFTR if the exit condition's IV is *not* a simple counter.
> -  Value *IncV = Phi->getIncomingValueForBlock(L->getLoopLatch());
> +  int Idx = Phi->getBasicBlockIndex(L->getLoopLatch());
> +  if (Idx < 0)
> +    return true;
> +  Value *IncV = Phi->getIncomingValue(Idx);
>    return Phi != getLoopPhiForCounter(IncV, L, DT);
>  }
>
>

Please update the comment to correspond to the change in behavior.

-eric



More information about the llvm-commits mailing list