https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109807
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Haochen Jiang from comment #4) > (In reply to Uroš Bizjak from comment #2) > > (In reply to Haochen Jiang from comment #1) > > > I further checked the reason, V2SI should never dropped into that function > > > because we have no pattern under V2SI. > > > > > > I suppose it is because -march=cascadelake will open SSE4.1, with the new > > > pattern, it wrongly dropped into that. > > > > > > -m32 will not ICE since TARGET_MMX_WITH_SSE need 64 bit and won't enable > > > the > > > new pattern. > > > > V2SI mul was introduced in r14-493 (AKA partial fix for PR109690). > > I see. So we might need to add cost for that right? Adding "case V2SImode:" above "case V4SImode:" in ix86_widen_mult_cost will fix this issue. Probably V4HImode is also needed above V8HImode, we have had a mulv4hi3 pattern for some time now.