This is an archive of the discontinued LLVM Phabricator instance.

[X86][SchedModel] Fix latency of the Hi register write of MULX (PR51495).
ClosedPublic

Authored by andreadb on Aug 25 2021, 7:04 AM.

Details

Summary

Before this patch, WriteIMulH reported a latency value which is correct for
the RR variant of MULX, but not for the RM variant.

This patch fixes the issue by introducing a new WriteIMulHLd, which is meant
to be used only by the RM variant of MULX.

Diff Detail

Event Timeline

andreadb created this revision.Aug 25 2021, 7:04 AM
andreadb requested review of this revision.Aug 25 2021, 7:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2021, 7:04 AM
lebedev.ri accepted this revision.Aug 25 2021, 7:13 AM

LGTM!
@RKSimon ?

llvm/lib/Target/X86/X86ScheduleZnver3.td
13

drop this

This revision is now accepted and ready to land.Aug 25 2021, 7:13 AM
andreadb added inline comments.Aug 25 2021, 7:32 AM
llvm/lib/Target/X86/X86ScheduleZnver3.td
13

Whoops.
No idea how I ended up modifying that line...
Nice catch!

andreadb updated this revision to Diff 368637.Aug 25 2021, 7:48 AM

Address review comments.

andreadb marked an inline comment as done.Aug 25 2021, 7:48 AM
RKSimon accepted this revision.Aug 25 2021, 7:56 AM

LGTM with one minor

llvm/lib/Target/X86/X86SchedBroadwell.td
167

please can you move this back up - I'm trying to reduce the diffs between this + haswell at the moment

andreadb added inline comments.Aug 25 2021, 8:06 AM
llvm/lib/Target/X86/X86SchedBroadwell.td
167

No problem. I will move it back up before committing the patch. Thanks!

This revision was landed with ongoing or failed builds.Aug 25 2021, 8:12 AM
This revision was automatically updated to reflect the committed changes.