This is an archive of the discontinued LLVM Phabricator instance.

[CostModel][X86] Fix permute latency cost
ClosedPublic

Authored by HaohaiWen on Nov 21 2022, 6:14 AM.

Details

Summary

Avx512 permute latency should be 3 instead of 1.

Diff Detail

Event Timeline

HaohaiWen created this revision.Nov 21 2022, 6:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 21 2022, 6:14 AM
HaohaiWen requested review of this revision.Nov 21 2022, 6:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 21 2022, 6:14 AM
HaohaiWen edited the summary of this revision. (Show Details)Nov 21 2022, 5:19 PM
HaohaiWen added reviewers: RKSimon, pengfei, LuoYuanke.

No test affected, or lacking test for them?

Please don't mix together small fixes and large refactorings.

No test affected, or lacking test for them?

Looks like no permute latency test.

Please don't mix together small fixes and large refactorings.

The previous AVX512ShuffleTbl used CostTblEntry so that all kinds use same cost value.
We have to change it to CostKindTblEntry.

RKSimon requested changes to this revision.Nov 22 2022, 12:17 AM

we don't yet have codesize/latency/sizelatency variants of the shuffle cost tests - these need adding first - it should be as simple as copying the core analysis/costmodel/x86/shuffle-* test files and testing for each cost kind (look at something like the arith-int* files for reference)

This revision now requires changes to proceed.Nov 22 2022, 12:17 AM
HaohaiWen updated this revision to Diff 477372.Nov 22 2022, 7:28 PM
HaohaiWen edited the summary of this revision. (Show Details)

Rebase upon D38485

Have you confirmed that this passes the whole of check-llvm? Sometime these cost changes have effects in transforms/codegen you don't expect

Have you confirmed that this passes the whole of check-llvm? Sometime these cost changes have effects in transforms/codegen you don't expect

Yes, all passed.

Testing Time: 44.72s

Skipped          :    59               
Unsupported      : 18869               
Passed           : 32462               
Expectedly Failed:    70

[100%] Built target check-llvm

RKSimon accepted this revision.Nov 23 2022, 2:53 AM

LGTM

This revision is now accepted and ready to land.Nov 23 2022, 2:53 AM
This revision was landed with ongoing or failed builds.Nov 23 2022, 3:17 AM
This revision was automatically updated to reflect the committed changes.