This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX] Update VCVTx, VMOVNTPx and VROUNDYPx instructions scheduling on btver2
ClosedPublic

Authored by avt77 on Oct 18 2017, 8:36 AM.

Details

Summary

This patch updates/adds some schedule numbers to AVX instructions on btver2 CPU.

Diff Detail

Repository
rL LLVM

Event Timeline

avt77 created this revision.Oct 18 2017, 8:36 AM
avt77 added a comment.Oct 23 2017, 5:03 AM

Postpone review of this patch until D39046 is committed: I should re-base it after that time.

avt77 updated this revision to Diff 120019.Oct 24 2017, 2:16 AM

I rebased the sources and made changes shorter: now we're dealing with 3 changed instrs only.

avt77 retitled this revision from [X86][AVX] Update instruction scheduling on btver2 to [X86][AVX] Update VCVTx, VMOVNTPx and VROUNDYPx instructions scheduling on btver2.Oct 24 2017, 2:17 AM
RKSimon added inline comments.Oct 24 2017, 2:29 PM
lib/Target/X86/X86ScheduleBtVer2.td
492 ↗(On Diff #120019)

Split off MOVNT* - they are stores so require a JAGU stage

avt77 updated this revision to Diff 120221.Oct 25 2017, 3:17 AM

I fixed MOVNT* issue raised by Simon.

RKSimon added inline comments.Oct 27 2017, 4:11 AM
lib/Target/X86/X86ScheduleBtVer2.td
544 ↗(On Diff #120221)

Please rename these WriteVCVTY / WriteVCVTYLd (or something similar). I think you can put the VCVTPS2DQ instructions in here as well?

555 ↗(On Diff #120221)

Can you add VMOVNTDQYmr as well? Even though we don't test for it properly due to domain issues.....

576 ↗(On Diff #120221)

This should be 8? Anyway, the VCVTPS2DQ can be merged with VCVTDQ2PD/VROUND above

avt77 updated this revision to Diff 120613.Oct 27 2017, 8:07 AM

All issues raised by Simon were fixed.

RKSimon added inline comments.Oct 27 2017, 8:53 AM
lib/Target/X86/X86ScheduleBtVer2.td
543 ↗(On Diff #120613)

We need VCVTPS2DQYrr and VCVTTPS2DQYrr

551 ↗(On Diff #120613)

We need VCVTPS2DQYrm and VCVTTPS2DQYrm

564 ↗(On Diff #120613)

We need VCVTTPD2DQYrr as well

570 ↗(On Diff #120613)

We need VCVTTPD2DQYrm as well

avt77 updated this revision to Diff 120809.Oct 30 2017, 6:18 AM

New required instructions were added.

RKSimon edited edge metadata.

Please can you rebase? I add the missing AVX cvtpd2dq/cvtps2dq tests at rL316926

avt77 updated this revision to Diff 120982.Oct 31 2017, 7:46 AM

I re-based the required test.

RKSimon added inline comments.Oct 31 2017, 9:19 AM
test/CodeGen/X86/avx-schedule.ll
1285 ↗(On Diff #120982)

Load latency looks wrong

1475 ↗(On Diff #120982)

This should be [8:2.00]

avt77 updated this revision to Diff 121109.Nov 1 2017, 3:35 AM

I fixed the bug with vcvttp*.

RKSimon accepted this revision.Nov 1 2017, 8:51 AM

LGTM - thanks

This revision is now accepted and ready to land.Nov 1 2017, 8:51 AM
This revision was automatically updated to reflect the committed changes.