[Bug middle-end/118012] [avr] Expensive code (bit extract + extend + neg + and) instead of bit test
gjl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 12 10:53:45 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118012
--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Georg-Johann Lay from comment #0)
> For comparison, here is the code when the test is for bit 1 instead of bit 0:
>
> if (b & 1)
^^^^^^^^^^
This should be "if (b & 2)"
> c ^= a;
>
> sbrs r20,1 ; 75 [c=4 l=2] *sbrx_branchhi
> rjmp .L3
> eor r24,r18 ; 73 [c=4 l=1] *xorqi3
> eor r25,r19 ; 74 [c=4 l=1] *xorqi3
More information about the Gcc-bugs
mailing list