Page MenuHomePhabricator

[LV] Don't let ForceTargetInstructionCost override Invalid cost.
ClosedPublic

Authored by sdesmalen on Jul 23 2021, 9:15 AM.

Details

Summary

Invalid costs can be used to avoid vectorization with a given VF, which is
used for scalable vectors to avoid things that the code-generator cannot
handle. If we override the cost using the -force-target-instruction-cost
option of the LV, we would override this mechanism, rendering the flag useless.

This change ensures the cost is only overriden when the original cost that
was calculated is valid. That allows the flag to be used in combination
with the -scalable-vectorization option.

Diff Detail

Event Timeline

sdesmalen created this revision.Jul 23 2021, 9:15 AM
sdesmalen requested review of this revision.Jul 23 2021, 9:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2021, 9:15 AM
This revision is now accepted and ready to land.Jul 26 2021, 3:12 AM
sdesmalen edited the summary of this revision. (Show Details)

Split some of the tests from sve-inductions.ll to a non-aarch64-specific test using the -force-target-supports-scalable-vectors flag (partly because one of the tests requires VF=vscale x 1. The other tests moved seemed non-AArch64-specific.

sdesmalen edited the summary of this revision. (Show Details)

Moved changes for sve-inductions.ll to a separate NFC patch.

This revision was landed with ongoing or failed builds.Jul 26 2021, 12:29 PM
This revision was automatically updated to reflect the committed changes.