https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85694
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Richard Biener from comment #2) > Hmm, but if you have 255 + 255 + 1 then you need to use pavgw at least, > otherwise the vectorization isn't semantically equivalent? Or do the > instructions compute > the intermediate results in greater precision than 8 bits? The specification > doesn't seem to tell. > > Can you clarify? According to [1], intermediate result has 9 bit precision for pavgb and 17bit precision for pavgw. [1] http://www.felixcloutier.com/x86/PAVGB:PAVGW.html