This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Tweak getTypeLegalizationCost()
ClosedPublic

Authored by rampitec on Jul 2 2020, 12:54 PM.

Details

Summary

Even though wide vectors are legal they still cost more as we
will have to eventually split them. Not all operations can
be uniformly done on vector types.

Conservatively add the cost of splitting at least to 8 dwords,
which is our widest possible load.

We are more or less lying to cost mode with this change but
this can prevent vectorizer from creation of wide vectors which
results in RA problems for us.

Diff Detail

Event Timeline

rampitec created this revision.Jul 2 2020, 12:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2020, 12:54 PM
arsenm accepted this revision.Jul 6 2020, 1:43 PM

The adds shouldn't really increase in cost, but the concept of type legality is broken anyway

This revision is now accepted and ready to land.Jul 6 2020, 1:43 PM
This revision was automatically updated to reflect the committed changes.