This is an archive of the discontinued LLVM Phabricator instance.

[Loads] Use more powerful constant folding API
ClosedPublic

Authored by nikic on Oct 21 2021, 12:06 PM.

Details

Summary

This follows up on D111023 by exporting the generic "load value from constant at given offset as given type" and using it in the store to load forwarding code. We now need to make sure that the load size is smaller than the store size, previously this was implicitly ensured by ConstantFoldLoadThroughBitcast().

Diff Detail

Event Timeline

nikic created this revision.Oct 21 2021, 12:06 PM
nikic requested review of this revision.Oct 21 2021, 12:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 21 2021, 12:06 PM
aeubanks accepted this revision.Oct 21 2021, 12:47 PM
aeubanks added inline comments.
llvm/test/Transforms/InstCombine/load-store-forward.ll
4–5

comment needs updating

This revision is now accepted and ready to land.Oct 21 2021, 12:47 PM
This revision was automatically updated to reflect the committed changes.