This is an archive of the discontinued LLVM Phabricator instance.

Fix invalid alignment in DAGCombiner::isLegalNarrowLdSt
ClosedPublic

Authored by gchatelet on Jun 25 2020, 8:25 AM.

Details

Summary

ShAmt / 8 can be a non power of two, this can lead to an invalid alignment.
context: https://reviews.llvm.org/D41350#inline-749165

Diff Detail

Event Timeline

gchatelet created this revision.Jun 25 2020, 8:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2020, 8:25 AM
gchatelet marked an inline comment as done.Jun 25 2020, 8:28 AM
gchatelet added inline comments.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
4879

assert here is just to refresh what is established L.4861
It helps understand why ShAmt / 8 is valid.

samparker accepted this revision.Jun 29 2020, 12:51 AM

Thanks.

This revision is now accepted and ready to land.Jun 29 2020, 12:51 AM
This revision was automatically updated to reflect the committed changes.