https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109797
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Richard Biener from comment #4) > No, it's indeed plain -O2 with the default architecture level, thus SSE2 > only. > > For the case of "complex" expansions we might want to bite the bullet and > fix the GIGO vectorizer cost modeling in the target. add_stmt_cost should > use ix86_multiplication_cost here passing down V2SImode. There's cases > for various integer multiplication emulations but your patch didn't amend > this function for the new V2SImode emulation w/o SSE4. Maybe the pattern should only be enabled for TARGET_SSE4_1, where it is implemented with native instruction. Using PMULUDQ, shuffling arguments and the result around looks like it will never be a win for V2SI, while it is worthwhile for V4SI, where the approach is taken from. The pattern was introduced as a partial fix for PR109690.