This is an archive of the discontinued LLVM Phabricator instance.

[CostModel] Return Invalid cost in getArithmeticCost instead of crashing for scalable vectors.
ClosedPublic

Authored by sdesmalen on Jun 7 2021, 2:59 AM.

Details

Summary

This fixes an issue in BasicTTIImpl.h where it tries to do a
cast<FixedVectorType> on a scalable vector type in order to get the
scalarization cost. Because scalarization of scalable vectors is not
supported, we return Invalid instead.

Diff Detail

Event Timeline

sdesmalen requested review of this revision.Jun 7 2021, 2:59 AM
sdesmalen created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2021, 2:59 AM
RKSimon accepted this revision.Jun 7 2021, 3:01 AM
RKSimon added a subscriber: RKSimon.

LGTM

This revision is now accepted and ready to land.Jun 7 2021, 3:01 AM

That was fast, cheers @RKSimon! :)

This revision was landed with ongoing or failed builds.Jun 7 2021, 9:26 AM
This revision was automatically updated to reflect the committed changes.