https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94779

--- Comment #8 from Gabriel Ravier <gabravier at gmail dot com> ---
Also, this code : 

int f1(unsigned x)
{
    if (x >= 3)
        __builtin_unreachable();

    switch (x)
    {
        case 0:
            return 1;
        case 1:
            return 2;
        case 2:
            return 3;
    }
}

doesn't optimize as well as 

int f1(unsigned x)
{
    switch (x)
    {
        case 0:
            return 1;
        case 1:
            return 2;
        case 2:
            return 3;
    }
}

, despite being both equivalent and providing more information to the early
stages of optimization. Should I open a seperate bug report for this or is it
close enough to this that it would be considered a duplicate ?

Reply via email to