https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106562
--- Comment #2 from Dimitar Dimitrov <dimitar at gcc dot gnu.org> --- With cbranchdi4 defined, the generated code is now 10 instructions: test: qbne .L5, r15, 0 qbeq .L4, r14, 0 .L5: rsb r0, r16, 0 rsc r1, r17, 0 or r0, r0, r16 or r1, r1, r17 lsr r14, r1, 31 ret .L4: ldi r14, 0 ret Defining BRANCH_COST=0, as avr backend does, shrinks the above to only 7 instructions.