This is an archive of the discontinued LLVM Phabricator instance.

[AggressiveInstCombine] Fix invalid TypeSize conversion when combining loads.
ClosedPublic

Authored by paulwalker-arm on Dec 15 2022, 7:11 AM.

Details

Summary

Much of foldLoadsRecursive relies on knowing the size of loaded
data, which is not possible for scalable vector types. However,
the logic of combining two small loads into one bigger load does
not apply for vector types so rather than converting the algorithm
to use TypeSize I've simply added an early exit for vectors.

Fixes #59510

Diff Detail

Event Timeline

paulwalker-arm created this revision.Dec 15 2022, 7:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2022, 7:11 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
paulwalker-arm requested review of this revision.Dec 15 2022, 7:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2022, 7:11 AM
paulwalker-arm edited the summary of this revision. (Show Details)Dec 16 2022, 3:11 AM
dmgreen accepted this revision.Dec 16 2022, 6:51 AM

LGTM

llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
776

Perhaps move the check to here? This is the "entry point" of the optimization, and none of it was designed for vectors.

This revision is now accepted and ready to land.Dec 16 2022, 6:51 AM