jacobly0 / llvm-project

This fork of the canonical git mirror of the LLVM subversion repository adds (e)Z80 targets. Please refer to the wiki for important build instructions.
https://github.com/jacobly0/llvm-project/wiki
123 stars 15 forks source link

Register allocation error #45

Open mateoconlechuga opened 10 months ago

mateoconlechuga commented 10 months ago

This code:

short foo(unsigned char *data, unsigned long a, unsigned char b)
{
    short var = a / 2 + b;

    for (unsigned char i = 0; i < 8; i += 2)
    {
        var += data[i];
    }

    return var;
}

Results in error: ran out of registers during register allocation when any optimization level is used.