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

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Thomas Koenig from comment #0)

>         movl    %edi, %ecx

This one? It is needed because SAL wants its count argument in %cl and first
argument is passed in %edi (mandated by x86_64 ABI).

With -mbmi2, one gets:

        shrl    $10, %edi
        movl    $1, %eax
        andl    $3, %edi
        addl    $3, %edi
        shlx    %edi, %eax, %eax
        ret

Reply via email to