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

--- Comment #8 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
The backend part has been fixed, now we can generate bt + cmov for

unsigned test( unsigned a, unsigned b, unsigned c )
{
    return (a&(1<<b)) ? c : 2;
}


.LFB0:
        .cfi_startproc
        btl     %esi, %edi
        movl    $2, %eax
        cmovc   %edx, %eax
        ret
        .cfi_endproc


But for the original testcase when immediate is 0, it requires middle-end fix
as mententioned in #c4

Reply via email to