Page MenuHomePhabricator

[X86] Prefer MOVHLPS for shuffle(x,1,-1) extraction patterns (PR26515)
Changes PlannedPublic

Authored by RKSimon on May 9 2022, 8:23 AM.



We currently lower to UNPCKH but that means the source vector must match the destination vector causing an additional move, which MOVHLPS can avoid.

Fixes #26889

Diff Detail

Event Timeline

RKSimon created this revision.May 9 2022, 8:23 AM
RKSimon requested review of this revision.May 9 2022, 8:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2022, 8:23 AM

Are you planning to do anything about the false dependency? I don't think we'll pick a "long dead" register as the original bug report suggested.

Any suggestions?

I'll see if we can improve hasUndefRegUpdate

RKSimon updated this revision to Diff 428119.May 9 2022, 10:07 AM

Add hasUndefRegUpdate handling

RKSimon added inline comments.May 9 2022, 10:10 AM

TBH I'm not convinced any of these need dependency breaks.

craig.topper added inline comments.May 9 2022, 10:39 AM

Will it always insert a dependency break because it can't rewrite the tied dest?

RKSimon planned changes to this revision.Sun, Jun 12, 5:22 AM