On Tue, Dec 13, 2011 at 05:42:16PM +0400, Kirill Yukhin wrote: > The full case attached. > > Jakub, you are right, we have to convert signed ints into something a > bit more tricky. > BTW, here is output for that cases from Intel compiler:
Ah, so that matches to do j / 2 in the pattern recognizer as (j + (j < 0 ? 1 : 0)) >> 1 instead of (j + (j >> 31)) >> 1. What is faster remains to be measured. Let me hack up a quick pattern recognizer for this... Jakub