Something goes woring with cost computaton fir shifts: long ashl32_7 (long x) { return x << 7; } compiled with -O2 -dp -mmcu=atmega8 -S -fno-split-wide-types results in ashl32_7: /* DEBUG: cost = 32. */ lsl r22 ; 27 *ashlsi3_const/4 [length = 8] rol r23 rol r24 rol r25 lsl r22 rol r23 rol r24 rol r25 /* DEBUG: cost = 32. */ lsl r22 ; 28 *ashlsi3_const/4 [length = 8] rol r23 rol r24 rol r25 lsl r22 rol r23 rol r24 rol r25 /* DEBUG: cost = 32. */ lsl r22 ; 29 *ashlsi3_const/4 [length = 8] rol r23 rol r24 rol r25 lsl r22 rol r23 rol r24 rol r25 /* DEBUG: cost = 16. */ lsl r22 ; 30 *ashlsi3_const/2 [length = 4] rol r23 rol r24 rol r25 /* DEBUG: pattern-cost = 4. */ ret ; 26 return [length = 1] The insns are already there at .expand
... 3 typo in 2 words Something goes wrong with cost computation for shifts