This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/59968] Unused BT patterns


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
For

int
__attribute__((noinline))
foo1 (int x, int y)
{
  x &= ~(1 << y);
  return x;
}

we generate

    movl    %esi, %ecx
    movl    $-2, %eax
    roll    %cl, %eax
    andl    %edi, %eax
    ret

I expect

    movl    %edi, %eax
    btr     %esi, %eax
    ret


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]