[llvm-commits] [llvm] r55374 - in /llvm/trunk: lib/Transforms/Scalar/LoopStrengthReduce.cpp test/Transforms/LoopStrengthReduce/2008-08-14-ShadowIV.ll
Nick Lewycky
nicholas at mxc.ca
Tue Aug 26 20:00:53 PDT 2008
Let me try this again, with added sanity this time :-)
Nick Lewycky wrote:
>
>> +
>> + for (unsigned i = 0; i < n; ++i)
>> + foo((double)i);
>> +
>> + is trnasformed into
>
> typo: eliminate
uh huh. typo: transformed
>> +
>> + double d = 0.0;
>> + for (unsigned i = 0; i < n; ++i, ++d)
>> + foo(d);
>> + */
>
> I have a problem with this. Suppose you get:
>
> for (unsigned i = x; i != 5, ++i)
> foo((double)i);
>
> and SCEV claims the trip count is 10, regardless of what x is equal to.
Which is, of course, impossible. But suppose it were:
for (unsigned i = x; i != y; ++i)
then it's possible. Also, 10 would get unrolled, but just work with me
here. :-)
Nick
More information about the llvm-commits
mailing list