[LLVMdev] loop only executes once

Eli Friedman eli.friedman at gmail.com
Fri Jun 17 23:03:47 PDT 2011


On Fri, Jun 17, 2011 at 10:49 PM, Andrew Ferguson <andrewf at idlearts.com> wrote:
> Hello,
> I'm trying to get to grips with the c interface of llvm
> intending to eventually develop a front end for Purebasic
> Though I've hit the wall already writing an iterative Fibonacci
> function.
> While I think the module dump looks ok it doesn't work
> for any input > 2 the function returns 2, the loop only executes once
>
> Hopefully someone can see what the problem is from the output and the
> source. Does the input ArgX require to be cast?

I just tested the given IR dump, and it seems to compute Fibonacci
numbers correctly... your issue is probably somewhere else.

-Eli



More information about the llvm-dev mailing list