Re:Will It Optimize? See how well you can anticipate gcc's o...
by gsg on Sunday April 07, 2013 @11:40AM
(#5507535)
x86 has encodings for shifts by 1 that are two bytes, so there's no code size advantage.
[ Parent
| on HN ]
Re:Will It Optimize? See how well you can anticipate gcc's o...
by mpyne on Sunday April 07, 2013 @12:02PM
(#5507599)
Sometimes there are "canonical forms" for these operations depending on what chip is being targeted, where the hardware can automatically break data dependencies and improve hardware-level parallelism, as long as the instruction is encoded in the right form.
I don't know that this is necessarily the reason here, but it's one possible explanation.