[Bug tree-optimization/96938] Failure to optimize bit-setting pattern when not using temporary

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 12 16:22:00 GMT 2021


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase:
void
foo (char *x, int y)
{
  *x &= ~(1 << y);
}

void
bar (char *x, int y)
{
  int t = *x & ~(1 << y);
  *x = t;
}
With type narrowing which only happens in the FEs right now, we are then unable
to match bt* instruction.


More information about the Gcc-bugs mailing list