The difference between ./lli and lli

when I tried to use lli for executing a LLVM IR code with the following instructions:
./lli test.ll
it could get the right output.

But when I tried to use the other instructions as following:
lli test.ll
it happened to report an error:

lli: input.ll:64:3: error: instruction expected to be numbered '%40'
 %41 = phi i64 [ 0, %0 ], [ %59, %58 ]

so, I want to know why do ‘ lli ’ and ’ ./lli ’ have different execution results for the same code?
As a supplement,the source code I used:
test.txt (9.9 KB)


1 Like

Typing lli will pick up a binary from your PATH environment variable (try which lli so see from where), while ./lli will pick it up from the current directory.
It is likely that you can see the difference by comparing lli --version vs ./lli --version.

Thank you so much :slight_smile: