This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix incorrect use of MVT::getVectorNumElements in AArch64TTIImpl::getVectorInstrCost
ClosedPublic

Authored by david-arm on Jan 12 2022, 2:44 AM.

Details

Summary

If we are inserting into or extracting from a scalable vector we do
not know the number of elements at runtime, so we can only let the
index wrap for fixed-length vectors.

Tests added here:

Analysis/CostModel/AArch64/sve-insert-extract.ll

Diff Detail

Event Timeline

david-arm created this revision.Jan 12 2022, 2:44 AM
david-arm requested review of this revision.Jan 12 2022, 2:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2022, 2:44 AM
c-rhodes accepted this revision.Jan 12 2022, 3:06 AM

LGTM. I think you meant compile-time not runtime in the commit message?

This revision is now accepted and ready to land.Jan 12 2022, 3:06 AM
This revision was landed with ongoing or failed builds.Jan 13 2022, 1:27 AM
This revision was automatically updated to reflect the committed changes.