[llvm-commits] [llvm] r54786 - in /llvm/trunk: lib/Transforms/Scalar/LoopStrengthReduce.cpp test/Transforms/LoopStrengthReduce/2008-08-14-ShadowIV.ll

Devang Patel dpatel at apple.com
Fri Aug 15 12:12:47 PDT 2008


On Aug 14, 2008, at 9:31 PM, Eli Friedman wrote:

> I'm not sure if this is related to the patch, but one testcase I was
> trying that I expected to trigger the new code didn't end up
> triggering it, for reasons I haven't yet figured out:
>
> unsigned y(double);
> unsigned x(unsigned long long a) {
>  unsigned long long i = 0;
>  unsigned x = 0;
>  for ( ; i < a; x++, i++) y(x);
> }

In this case, IV is truncated from long long to unsigned before type  
casted into double, hence it escapes this new code.
-
Devang



More information about the llvm-commits mailing list