https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89386
Bug ID: 89386 Summary: Generation of vectorized MULHRS (Multiply High with Round and Scale) instruction Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ubizjak at gmail dot com Target Milestone: --- This PR is similar to PR85693 and PR85694, where missing generation of vectorized SAD (Sum of Absolute Difference) and AVG (Average) instruction was reported. Following code: --cut here-- #define N 1024 unsigned short as[N], bs[N], cs[N]; void foo_short (void) { int i; for (i = 0; i < N; i++) as[i] = ((((int)bs[i] * (int)cs[i]) >> 14) + 1) >> 1; } --cut here-- should vectorize with pmulhrsw SSSE3 instruction.