[llvm-commits] [llvm] r64918 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h lib/Analysis/ScalarEvolution.cpp lib/Transforms/Scalar/IndVarSimplify.cpp test/Transforms/IndVarSimplify/preserve-signed-wrap.ll test/Transforms/IndVarSimplify/promote-iv-to-eliminate-casts.ll test/Transforms/IndVarSimplify/signed-trip-count.ll

Chris Lattner clattner at apple.com
Mon Feb 23 14:30:49 PST 2009


On Feb 19, 2009, at 11:35 AM, Dan Gohman wrote:

>
> On Feb 18, 2009, at 10:07 AM, Chris Lattner wrote:
>
>>
>> On Feb 18, 2009, at 9:22 AM, Dan Gohman wrote:
>>
>>> Author: djg
>>> Date: Wed Feb 18 11:22:41 2009
>>> New Revision: 64918
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=64918&view=rev
>>> Log:
>>> Use a sign-extend instead of a zero-extend when promoting a
>>> trip count value when the original loop iteration condition is
>>> signed and the canonical induction variable won't undergo signed
>>> overflow. This isn't required for correctness; it just preserves
>>> more information about original loop iteration values.
>>
>> Dan, I'm concerned about this.  Sign extensions are generally more
>> expensive than zero extensions, and much of the optimizer
>> canonicalizes sign extends to zero extends.
>
>
> You're right. I'm reconsidering this; It may not actually
> be needed.

Should the patch be reverted?

-Chris



More information about the llvm-commits mailing list