On Thu, May 09, 2013 at 08:50:59PM +0200, Steven Bosscher wrote: > On Thu, May 9, 2013 at 8:45 PM, Jakub Jelinek wrote: > > This is something I've noticed while working on the rotate recognizer > > patch I've just posted. We emit say > > roll %eax > > instead of > > roll $1, %eax > > because the former is shorter, but emit > > roll $31, %eax > > instead of the equivalent, but shorter > > rorl %eax > > Wouldn't this be better done as one or more peephole2s?
Given that the output routine is in all cases already C code, I think peephole2s would be only slower and more code. Jakub