[Bug tree-optimization/32648] missed-optimization: bit-manipulation via bool's

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jun 10 01:56:38 GMT 2023


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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
We even miss f3 into f4:
unsigned f3(unsigned a)
{
        long b5 = (a & 0x20)>>5;
        long b3 = (a & 0x08)>>3;
        return b5 ^ b3;
}
unsigned f4(unsigned a)
{
        unsigned b5 = (a ^ (a << 2));
        return (b5>>5)&1;
}


More information about the Gcc-bugs mailing list