This is an archive of the discontinued LLVM Phabricator instance.

[CostModel][AMDGPU] Fix instructions costs estimation for vector types.
ClosedPublic

Authored by dfukalov on Dec 1 2021, 11:06 AM.

Details

Summary
  1. Fixed vector instructions costs estimations incosistency - removed different logic for "not simple types" since it biases costs for these types.
  2. Fixed legalization penalty for vectors too big for the target: changed from overwrite default legalization cost value estimation to added penalty.
  3. Fixed few typos in tests.

Diff Detail

Event Timeline

dfukalov created this revision.Dec 1 2021, 11:06 AM
dfukalov requested review of this revision.Dec 1 2021, 11:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 1 2021, 11:06 AM
Herald added a subscriber: wdng. · View Herald Transcript
rampitec added inline comments.Dec 1 2021, 11:15 AM
llvm/test/Analysis/CostModel/AMDGPU/add-sub.ll
75

Why dropping this?

dfukalov added inline comments.Dec 1 2021, 4:11 PM
llvm/test/Analysis/CostModel/AMDGPU/add-sub.ll
75

Actually tests for long vectors are needed to check the penalty is added in getTypeLegalizationCost(). But it is about vectors sized >256bits so we just need to check that cost for v5i64 is not a linear dependency with v4i64 and smaller vectors.

This revision is now accepted and ready to land.Dec 2 2021, 10:33 AM
This revision was landed with ongoing or failed builds.Dec 2 2021, 4:08 PM
This revision was automatically updated to reflect the committed changes.