[Bug tree-optimization/85694] Generation of vectorized AVG (Average) instruction
ubizjak at gmail dot com
Tue May 8 16:18:00 GMT 2018
--- 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 , intermediate result has 9 bit precision for pavgb and 17bit
precision for pavgw.
More information about the Gcc-bugs