[LLVMdev] LoopInfo fails

Jochen Wilhelmy j.wilhelmy at arcor.de
Wed Mar 31 08:12:29 PDT 2010


Hi!

if I have this little function:

float loopTest(float a, float b)
{
     float x = 1.0f;
     int i = 0;
     if (a < b)
         goto l;
     for (i = 0; i < 10; ++i)
     {
         x *= a;
l:
         x += b;
     }
     return x;
}

then llvm::LoopInfo does not detect that there is a loop.
Is this a bug or is such a case not allowed?

-Jochen




More information about the llvm-dev mailing list