This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Bail out of load-store forwarding for scalable vector types
ClosedPublic

Authored by david-arm on Feb 21 2022, 2:50 AM.

Details

Summary

This patch fixes an invalid TypeSize->uint64_t implicit conversion in
FoldReinterpretLoadFromConst. If the size of the constant is scalable
we bail out of the optimisation for now.

Tests added here:

Transforms/InstCombine/load-store-forward.ll

Diff Detail

Event Timeline

david-arm created this revision.Feb 21 2022, 2:50 AM
david-arm requested review of this revision.Feb 21 2022, 2:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2022, 2:50 AM
sdesmalen accepted this revision.Feb 21 2022, 8:29 AM
sdesmalen added inline comments.
llvm/lib/Analysis/ConstantFolding.cpp
592

nit: move this closer to its first use, i.e. line 599, thus below the if (Offset <= -1 * static_cast<....) condition that returns UndefValue.

llvm/test/Transforms/InstCombine/load-store-forward.ll
276

vscale_range isn't specifically required for these tests, you can remove it.

This revision is now accepted and ready to land.Feb 21 2022, 8:29 AM
This revision was landed with ongoing or failed builds.Feb 22 2022, 1:26 AM
This revision was automatically updated to reflect the committed changes.